fix(mdxish): handle lowercase <table> the same way as <Table>#1403
Open
maximilianfalco wants to merge 4 commits intonextfrom
Open
fix(mdxish): handle lowercase <table> the same way as <Table>#1403maximilianfalco wants to merge 4 commits intonextfrom
maximilianfalco wants to merge 4 commits intonextfrom
Conversation
4 tasks
…o/fix-rendering-difference-between-table-and-Table
maximilianfalco
added a commit
that referenced
this pull request
Apr 6, 2026
| 🎫 Resolve RM-15997 | | :-----------------: | ## 🎯 What does this PR do? Standlone `{user.` vars werent being properly parsed in`<Table>` cells. This PR fixes that issue by allowing variable transformer to also visit mdx flow elements > [!NOTE] The same issue is still happening with `<table>`. That will be solved when this PR gets merged in: #1403 ## 🧪 QA tips ``` <Table> <thead> <tr> <th> {user.name} </th> <th> {user.name} hello </th> </tr> </thead> <tbody> <tr> <td> {user.name} </td> </tr> </tbody> </Table> | hello | | -- | | {user.name}| | {user.name} hello| {user.name} ``` ## 📸 Screenshot or Loom Before | After -- | -- <img width="1077" height="369" alt="Screenshot 2026-04-06 at 17 48 10" src="https://github.com/user-attachments/assets/ff1b3fcd-3ab1-4932-ae89-596aa60574c1" /> | <img width="1079" height="372" alt="Screenshot 2026-04-06 at 17 47 49" src="https://github.com/user-attachments/assets/9291208d-1286-4b32-af68-4485fb66eb45" />
rafegoldberg
pushed a commit
that referenced
this pull request
Apr 7, 2026
…o/fix-rendering-difference-between-table-and-Table
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎯 What does this PR do?
In mdxish, lowercase
<table>was handled by CommonMark's HTML block type 6 parser, which fragments the block at blank lines. This caused inner markdown (blockquotes, code blocks, lists, etc.) inside<td>cells to not be parsed, and closing tags like</td>and</tr>to leak into the rendered output as visible text. The uppercase<Table>component worked fine because thejsxTablemicromark tokenizer captured it as a single block before CommonMark could claim it.This wasn't an issue in MDX because MDX treats all tags (including lowercase HTML) as JSX elements via its own tokenizer in
remarkMdxThis PR does a few things:
jsxTablemicromark tokenizer to match both<Table>and<table>, preventing fragmentation at blank linesmdxishTablestransformer to also process lowercase<table>nodes so inner markdown is re-parsedit.eachparity tests that compare the full HAST output of<table>vs<Table>usingtoStrictEqual🧪 QA tips
<table>containing a blockquote (> text) inside a<td>separated by blank lines, it should render identically to the same doc using<Table><TableRow>,<Tables>, and other Table-prefixed tags are still rejected by the tokenizer<Table>inside a fenced code block is still not tokenizedThis is a simple test, paste this in the demo app while viewing in both MDX and MDXish. Or use this link
📸 Screenshot or Loom