Skip to content

fix(mdxish): extend mdx tokenizer to fix commonmark splitting HTML issue#1533

Open
eaglethrost wants to merge 2 commits into
kevin/cx-3646-forced-mdx-mdxish-migration-breaks-custom-style-blocks-andfrom
dimas/cx-3646-dont-reuse-preprocessor
Open

fix(mdxish): extend mdx tokenizer to fix commonmark splitting HTML issue#1533
eaglethrost wants to merge 2 commits into
kevin/cx-3646-forced-mdx-mdxish-migration-breaks-custom-style-blocks-andfrom
dimas/cx-3646-dont-reuse-preprocessor

Conversation

@eaglethrost

Copy link
Copy Markdown
Contributor
🎫 Resolve CX-3646

🎯 What does this PR do?

PR #1532 to address CX-3646 creates a preprocessing step protect-nested-html-blank-lines.ts‎ to address the issue of HTML tags getting fragmented when there's empty spaces inside (due to CommonMark rules).

This PR attempts to fix the same issue without the preprocessing by piggy backing & extending the MDX tokenizer to also capture HTML sequences without brace attributes, which would capture the sequence that has the problematic empty lines in it. The state would be marked as isPlainBlockClaim. It would prevent another preprocessing steps which is flaky and more difficult to maintain.

🧪 QA tips

The same tests should pass and the CX-3646 doc should still render

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