fix(mdxish): callout end tag rendering#1373
Merged
eaglethrost merged 2 commits intonextfrom Mar 15, 2026
Merged
Conversation
Co-authored-by: Kevin Ports <kevin.ports@gmail.com>
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.
🧰 Changes
As a part to resolve a Callout component deserialization issue in RM-15614, it turns out that particular callout was not creating the correct tree & some its content is incorrectly rendered. The cause was that a logic in the mdxish component transformation which was unwrapping the paragraph from a part of the node that contains the closing tag (if the closing tag is together with the content before it). In the case of the example in the ticket, the Callout ends up with children [h3, text, strong, text] instead of [h3, p]. The inline nodes (text, strong) become direct children of the Callout rather than being nested inside a paragraph element.
The fix is to use the full node content instead of the children only (unwrapped). Did a few testing and I haven't found any regressions, the change should only wrap some content as it originally was which shouldn't cause rendering differences (this is specific to Callouts)
🧬 QA & Testing
Using the content in mdxish:
It should render the "Body with markdown support" part in one line