You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Hard line breaks are lost: <br> and Word line breaks become spaces #2642
markdownify writes a <br> as two trailing spaces, which is a Markdown hard line break. MarkItDown.convert() then strips trailing whitespace from every output line (the "Normalize the content" step in _markitdown.py). Every hard line break therefore becomes a soft break, which renders as a space. This affects every converter that renders HTML through markdownify, including HTML, DOCX (Word line breaks, Shift+Enter) and RSS. It also affects the OCR text that markitdown-ocr adds for images in DOCX, PPTX and XLSX files.
Related: #2528 reports that the same normalization removes trailing spaces in fenced code blocks. Its PRs, #2529 and #2633, change only code blocks. Open PR #2559 would fix this by keeping lines that end in two or more spaces during the normalization.
Activity