Skip to content

Errors with some HTML snippets with tags (mdx 1.6.22) #1568

Answered by ChristianMurphy
tnir asked this question in Q&A
Discussion options

You must be logged in to vote

It is, in MDX 1 an empty newline inside a JSX block allows non-JSX content to be mixed in.
In the first example, the JSX block has switched back to markdown, where {a: 0} is interpreted as plain text.
In the second example, the content is still inside JSX, and is interpreted as a JSX expression, and a: 0 is invalid JS/JSX.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@tnir
Comment options

Answer selected by ChristianMurphy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants