Skip to content

html → markdown turns <br/> in list items and table cells into a space (diverges from storage → markdown) #253

Description

@pchuri

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions