okular/autotests
bob sayshilol 0bc8c76c3c Fix strikethrough rendering in markdown converter
Previously the `<del>` tag that Discount emits would be removed by Qt
since it's not in the subset of HTML that it understands. It does know
about `<s>` though, so replace `<del>` with `<s>` to render strikethroughs
correctly.

Note that I couldn't get Okular to build locally (PEBCAK issue) so I split out this file to debug it. I've tested against http://daringfireball.net/projects/downloads/MarkdownTest_1.0.zip and ff866f73d4/tests/data and the only difference is that trailing whitespace is now trimmed from the end of a line:
```diff
8c8
< <p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Dashes:</p>
---
> <p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Dashes: </p>
```
A quick search suggests this isn't a problem though https://stackoverflow.com/a/27026403:
> Within block tags (i.e. `<p>`, `<h1>`, `<div>`, ...) spaces as well as line breaks at the beginning or end of the tags should always be ignored (i.e. `<p>test</p>` should look the same as `<p> test </p>`).

I also tried https://doc.qt.io/qt-5/qtextdocument.html#setMarkdown which solves the strikethrough problem, though there are many visible differences with that approach. Most notably, everything is squashed together and code blocks lose their formatting.
2024-04-22 17:00:02 +00:00
..
data Fix strikethrough rendering in markdown converter 2024-04-22 17:00:02 +00:00
addremoveannotationtest.cpp slots -> Q_SLOTS 2022-03-19 10:58:47 +00:00
annotationstest.cpp Fix unit test warnings 2024-01-12 11:13:10 +01:00
annotationtoolbartest.cpp Make autotests compile with qt6 2023-12-18 22:56:22 +00:00
calculatetexttest.cpp Port away from more QLinkedLists 2022-03-22 12:58:59 +01:00
check_distinguished_name_parser.cpp Remove unused includes and avoid Qt module include 2023-12-28 14:14:15 +01:00
closedialoghelper.cpp Include only needed headers instead of QtDBus module header 2023-06-07 22:41:22 +00:00
closedialoghelper.h slots -> Q_SLOTS 2022-03-19 10:58:47 +00:00
CMakeLists.txt Adapt cmake for library name change for kexiv2 and plasma-activities 2023-12-18 22:56:22 +00:00
documenttest.cpp Don't use private Qt api 2023-08-10 23:06:18 +00:00
editannotationcontentstest.cpp slots -> Q_SLOTS 2022-03-19 10:58:47 +00:00
editdrawingtooldialogtest.cpp Convert license headers to SPDX 2021-06-10 08:11:56 +00:00
editdrawingtooldialogtest.h Convert license headers to SPDX 2021-06-10 08:11:56 +00:00
editformstest.cpp Port away from more QLinkedLists 2022-03-22 12:58:59 +01:00
formattest.cpp Add unit test for AFNumber_Format 2024-04-17 06:54:22 +00:00
generatorstest.cpp s/qAsConst/std::as_const/ 2023-12-19 11:46:24 +00:00
jsfunctionstest.cpp Newer clazy: More for loops 2024-03-04 16:54:09 +01:00
keystroketest.cpp Include only needed headers instead of QtTest module header 2023-06-07 23:11:21 +02:00
mainshelltest.cpp Port from removed KConfigGroup keys api 2023-12-21 13:06:42 +01:00
markdowntest.cpp Fix strikethrough rendering in markdown converter 2024-04-22 17:00:02 +00:00
modifyannotationpropertiestest.cpp slots -> Q_SLOTS 2022-03-19 10:58:47 +00:00
parttest.cpp Fix multiline selection 2024-03-05 21:07:10 +00:00
searchtest.cpp Simplify textentity memory management 2024-02-07 14:07:08 +00:00
shelltest.cpp slots -> Q_SLOTS 2022-03-19 10:58:47 +00:00
signatureformtest.cpp Port away from more QLinkedLists 2022-03-22 12:58:59 +01:00
signunsignedfieldtest.cpp Remove virtual methods from signature and certificate info 2023-05-03 09:15:42 +00:00
suggestedfilenametest.cpp Better suggested signed name 2023-08-07 22:08:20 +00:00
testingutils.cpp Add missing includes 2023-09-11 16:47:17 +02:00
testingutils.h Port a few QLinkedList to QList 2022-03-19 11:22:55 +00:00
toggleactionmenutest.cpp Include only needed headers instead of QtTest module header 2023-06-07 23:11:21 +02:00
translateannotationtest.cpp Port a few QLinkedList to QList 2022-03-19 11:22:55 +00:00
urldetecttest.cpp Convert license headers to SPDX 2021-06-10 08:11:56 +00:00
visibilitytest.cpp Include only needed headers instead of QtTest module header 2023-06-07 23:11:21 +02:00