Skip to content

Comments

Br tag visibility issue#1178

Draft
terryyin wants to merge 1 commit intomainfrom
cursor/br-tag-visibility-issue-1371
Draft

Br tag visibility issue#1178
terryyin wants to merge 1 commit intomainfrom
cursor/br-tag-visibility-issue-1371

Conversation

@terryyin
Copy link
Member

@terryyin terryyin commented Feb 5, 2026

Correctly render <br> tags in round-trip markdown conversion to prevent them from being escaped.

The wrapStandaloneBrInParagraph function in markdownToQuillHtml.ts failed to correctly wrap <br> tags appearing at the end of content after </p> or multiple consecutive <br> tags. This resulted in the <br> tags being escaped as &lt;br&gt; during a markdown -> HTML -> markdown -> HTML round-trip, making them visible as text instead of rendering as line breaks.


Slack Thread

Open in Cursor Open in Web

- Added handling for <br> tags at end of content after </p>
- Added loop to handle multiple consecutive <br> tags
- Added test for round-trip conversion without escaping

Co-authored-by: Terry Yin <terry.yinzhe@gmail.com>
@cursor
Copy link

cursor bot commented Feb 5, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants