okular/generators/markdown
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
..
CMakeLists.txt Switch to kf6 2023-12-18 22:56:22 +00:00
converter.cpp Fix strikethrough rendering in markdown converter 2024-04-22 17:00:02 +00:00
converter.h Fix strikethrough rendering in markdown converter 2024-04-22 17:00:02 +00:00
debug_md.h Convert license headers to SPDX 2021-06-10 08:11:56 +00:00
generator_md.cpp markdown: Don't try re-converting a document if there's none 2023-12-07 15:28:28 +00:00
generator_md.h Convert license headers to SPDX 2021-06-10 08:11:56 +00:00
libokularGenerator_md.json SVN_SILENT made messages (.desktop file) - always resolve ours 2024-03-09 01:13:56 +00:00
Messages.sh add markdown support 2017-08-25 01:05:23 +02:00
okularApplication_md.desktop SVN_SILENT made messages (.desktop file) - always resolve ours 2024-02-14 01:13:45 +00:00
org.kde.mobile.okular_md.desktop SVN_SILENT made messages (.desktop file) - always resolve ours 2024-02-14 01:13:45 +00:00
org.kde.okular-md.metainfo.xml GIT_SILENT Update Appstream for new release 2024-04-08 18:04:20 +02:00