Skip to content

fix(mdxish): terminate html flow block when opener has trailing text#1495

Open
maximilianfalco wants to merge 1 commit into
nextfrom
falco/rm-16379-magic-blocks-right-under-an-opening-html-tag-that-has-text
Open

fix(mdxish): terminate html flow block when opener has trailing text#1495
maximilianfalco wants to merge 1 commit into
nextfrom
falco/rm-16379-magic-blocks-right-under-an-opening-html-tag-that-has-text

Conversation

@maximilianfalco

@maximilianfalco maximilianfalco commented May 29, 2026

Copy link
Copy Markdown
Contributor
🎫 Resolve RM-16379

🎯 What does this PR do?

Magic blocks placed directly under an opening HTML tag with trailing text were rendering as literal text because CommonMark consumed them into the HTML flow block. The terminateHtmlFlowBlocks preprocessor only recognized lines that were purely tags or had a matched open+close pair, so <li> test slipped past isLineHtml and no blank-line terminator was inserted.

Adds a third regex (HTML_LINE_WITH_TRAILING_CONTENT_REGEX) for lines that start with a lowercase HTML tag followed by trailing text

🧪 QA tips

 <li> test
[block:parameters]
{
  "data": {
    "h-0": "Heading",
    "0-0": "Content"
  },
  "cols": 1,
  "rows": 1,
  "align": [
    "left",
    "left"
  ]
}
[/block]

verify that the table renders as expected

📸 Screenshot or Loom

Before After
Screenshot 2026-05-29 at 14 25 42 Screenshot 2026-05-29 at 14 25 28

monorepo showcase
Screenshot 2026-05-29 at 14 41 10

@maximilianfalco maximilianfalco requested review from eaglethrost, jamestclark and kevinports and removed request for kevinports May 29, 2026 04:29
@gkoberger gkoberger force-pushed the falco/rm-16379-magic-blocks-right-under-an-opening-html-tag-that-has-text branch from 993085e to 13742c1 Compare June 7, 2026 00:20
@gkoberger gkoberger requested a review from a team June 7, 2026 00:20
@jboyens jboyens force-pushed the falco/rm-16379-magic-blocks-right-under-an-opening-html-tag-that-has-text branch from 13742c1 to 993085e Compare June 8, 2026 18:00
@erunion erunion requested review from a team and removed request for a team June 16, 2026 21:10
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.

1 participant