Follow-up from #242 / #248.
Description
After #248, storage → markdown keeps <br/> inside list items as a hard line break, and inside table cells as <br>. The html → markdown converter (lib/html-to-markdown.js) still turns both into a space, so the two converters now disagree on the same input. #149 was about exactly this kind of drift.
Repro (v2.25.8)
List item:
htmlToMarkdown('<ul><li>line1<br/>line2</li></ul>')
// html: "- line1 line2"
// storage: "- line1\\\n line2" (storageToMarkdown on the same markup)
Table cell:
htmlToMarkdown('<table><tbody><tr><td>line one<br/>line two</td></tr></tbody></table>')
// html: "| line one line two |\n| --- |"
// storage: "| line one<br>line two |\n| --- |"
Expected
Both converters should produce the same output as storage → markdown.
Notes
Follow-up from #242 / #248.
Description
After #248, storage → markdown keeps
<br/>inside list items as a hard line break, and inside table cells as<br>. The html → markdown converter (lib/html-to-markdown.js) still turns both into a space, so the two converters now disagree on the same input. #149 was about exactly this kind of drift.Repro (v2.25.8)
List item:
Table cell:
Expected
Both converters should produce the same output as storage → markdown.
Notes
HARD_BREAKsentinel (U+E003) inlib/markdown-cleanup.js, plusescapeContinuationLineand trailing-backslash handling inlib/storage-walker.js. Reuse these rather than duplicating them. Watch for the edge cases fix(storage-walker): keep <br/> inside list items as a hard line break #248 covered: a trailing\before the break, and continuation lines that look like block syntax (-,1.,#,--- | ---).<br/>is a soft break in both converters. It is out of scope here.