Repository navigation
fix: preserve Markdown hard line breaks - #2559
Maciej Zmitrukiewicz (MaciejZet) wants to merge 2 commits into
Conversation
|
@microsoft-github-policy-service agree |
12f310e to
3faa1f0
Compare
|
I tested this PR (
These tests expect plain newlines or a paragraph break; #2643 intentionally produces backslash hard breaks. Updating those five expectations and the test names, with no further production-code changes, gave 1091 passed, 57 skipped on Python 3.12. The OCR suite also passed 108 tests, and all 37 comparison cases matched the expected combined behavior. The patches appear compatible in this tested scope: this PR preserves two-space hard breaks in Markdown input, while #2643 handles generated breaks. Some nested If #2643 lands, I can update these five expectations here to match its output. |
Markdown input loses two-space hard breaks during final whitespace normalization. Preserve two or more trailing spaces on nonblank lines when
PlainTextConverterhandles input identified as Markdown by its extension (.md,.markdown) or MIME type (text/markdown,application/markdown).Other formats and converter implementations retain their existing normalization. Single trailing spaces, tabs, whitespace-only lines, and blank-line collapsing are unchanged. This does not provide full whitespace preservation inside code blocks.
Related: #2643 addresses breaks generated from HTML. This PR preserves hard-break syntax already present in Markdown input.
Validation
GITHUB_ACTIONS=1: 1080 passed, 57 skipped. Skips include external-service tests and native Windows checks.git diff --check: pass.