micromark / micromark-extension-mdx-jsx

micromark extension to support MDX or MDX.js JSX
https://unifiedjs.com
MIT License
8 stars 4 forks source link

Add a nice error on `<` at start of attribute value. #4

Closed wooorm closed 3 years ago

wooorm commented 3 years ago

Subject of the feature

JSX has different attribute values: v={1}, w="2", x='3', y=<>4</>, and , x=<a>5</a>. We don‘t support the last two, because it would be ambiguous whether it’d include MDX or JSX. And folks can explicitly enter JSX land by using braces: {<>asd</>} already.

Problem

There’s a non-nice error

Expected behavior

Something should crash nicely saying that tags as attribute values aren’t supported, but using braces works.