Skip to content

Commit

Permalink
pandoc: preserve linebreaks
Browse files Browse the repository at this point in the history
We can't fix superfluous line breaks just by guessing.
  • Loading branch information
marph91 committed Feb 17, 2025
1 parent 5580d8f commit b06ac0b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/markdown_lib/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ def html_to_markdown(text_html: bytes | str, custom_filter: list | None = None):
format=INTERMEDIATE_FORMAT,
extra_args=[
# don't create artificial line breaks
"--wrap=none",
"--wrap=preserve",
],
)
if "[TABLE]" in text_md:
Expand Down Expand Up @@ -340,7 +340,7 @@ def markup_to_markdown(
# somehow the temp folder is needed to create the resources properly
f"--extract-media={resource_folder}",
# don't create artificial line breaks
"--wrap=none",
"--wrap=preserve",
],
)

Expand Down
2 changes: 1 addition & 1 deletion test/data
Submodule data updated 36 files
+5 −2 reference_data/default_format/eml/eml/error_emails/content_transfer_encoding_empty.md
+60 −23 reference_data/default_format/eml/eml/error_emails/content_transfer_encoding_with_8bits.md
+147 −32 reference_data/default_format/html/html/Hypertext Markup Language – Wikipedia.md
+7 −2 reference_data/default_format/latex/latex/example.md
+5 −1 reference_data/default_format/mediawiki/mediawiki/Wikipedia-20250116163800.md
+13 −5 reference_data/default_format/mediawiki/mediawiki/Wikipedia-20250116165027.md
+2 −1 reference_data/default_format/multiple_folders 0/arbitrary_folder/nested_arbitrary_folder/asciidoc.md
+2 −1 reference_data/default_format/multiple_folders 1/arbitrary_folder/nested_arbitrary_folder/asciidoc.md
+5 −2 reference_data/default_format/odt/odt/Handout-Muster-Uni-LibreOffice-neu.md
+8 −1 reference_data/default_format/odt/odt/LibreOffice Writer Extended.md
+2 −1 reference_data/default_format/single_folder/arbitrary_folder/nested_arbitrary_folder/asciidoc.md
+37 −17 reference_data/default_format/txt2tags/txt2tags-2/sample_adoc.md
+35 −16 reference_data/default_format/txt2tags/txt2tags-2/sample_dbk.md
+33 −15 reference_data/default_format/txt2tags/txt2tags-2/sample_doku.md
+35 −16 reference_data/default_format/txt2tags/txt2tags-2/sample_html.md
+35 −16 reference_data/default_format/txt2tags/txt2tags-2/sample_html5.md
+33 −15 reference_data/default_format/txt2tags/txt2tags-2/sample_rst.md
+37 −17 reference_data/default_format/txt2tags/txt2tags-2/sample_t2t.md
+33 −15 reference_data/default_format/txt2tags/txt2tags-2/sample_tex.md
+36 −16 reference_data/default_format/txt2tags/txt2tags-2/sample_txt2t.md
+87 −24 reference_data/default_format/txt2tags/txt2tags-2/sample_wiki.md
+35 −16 reference_data/default_format/txt2tags/txt2tags-2/sample_xhtml.md
+35 −16 reference_data/default_format/txt2tags/txt2tags-2/sample_xhtmls.md
+36 −2 reference_data/google_docs/test_1/Drive/Lebenslauf.md
+28 −14 reference_data/tiddlywiki/test_4/25 Free Reference Photo Websites for Artists in 20.md
+120 −39 reference_data/tiddlywiki/test_4/Advanced topics — Paperless-ng 1.5.0 documentation.md
+12 −5 reference_data/tiddlywiki/test_4/ConnMan - ArchWiki.md
+25 −9 reference_data/tiddlywiki/test_4/Connecting to a bluetooth speaker with pulseaudio.md
+16 −7 reference_data/tiddlywiki/test_4/How to Set Up WireGuard VPN on Debian 10 _ Linuxiz.md
+2 −1 reference_data/tiddlywiki/test_4/Upgrade LineageOS on bramble _ LineageOS Wiki.md
+12 −5 reference_data/tiddlywiki/test_4/Using ADB and fastboot _ LineageOS Wiki.md
+4 −2 reference_data/tiddlywiki/test_4/WireGuard - ArchWiki.md
+11 −1 reference_data/tiddlywiki/test_4/WireGuard - LibreELEC.wiki.md
+3 −1 reference_data/wordpress/test_1/My WordPress Website/Hello world!.md
+19 −3 reference_data/wordpress/test_3/Akabeko/Sample Post.md
+26 −4 reference_data/wordpress/test_4/A geek with a hat/Use ref callbacks to measure React component size.md

0 comments on commit b06ac0b

Please sign in to comment.