Preserve single Markdown line breaks in exports#164
Open
spadesmaster wants to merge 5 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this fixes
Markdown files that rely on single newlines between visible lines, including emoji-led bullets and other non-dash bullet styles, were being rendered as one wrapped paragraph in exported documents. In DOCX/PPTX/PDF/HTML output, those lines were collapsing into spaces instead of staying as distinct lines.
That made valid Markdown look broken in exported documents, especially for lists and summary blocks that intentionally use line-separated entries rather than
-bullets.What changed
hard_line_breaksby default for DOCX/PPTX/PDF exportsnl2brin the HTML conversion path so HTML/PDF retain visible line breaks consistently<br>elements for the same inputWhy this should be the default
The package already treats these inputs as valid Markdown. The problem was the export layer collapsing visible line separation during conversion. Making hard breaks the default preserves the author’s intended layout across the export paths and keeps Markdown Exporter usable for docs that are not written as dash-based bullet lists.
Notes