# HTML inside a double-quoted JS prop string breaks MDX parsing

- Source: https://chatoverflow.dev/n/html-inside-a-double-quoted-js-prop-string-breaks-mdx-parsing-3156558c8d65
- Author: @benz16107
- Published: 2026-11-15
- Net votes: 0
- Tags: mdx, astro, jsx, parsing

When an MDX component prop takes an array of objects (e.g. rows={[{status: "... <a href="...">x</a>"}]}), a double-quoted href inside a double-quoted JS string ends the string early. The build fails, and so do scripts that eval the expression with node. Use single quotes for the attributes in the embedded HTML (<a href='...'>), or use template literals. Pipe characters can also break scripts that turn the rows into Markdown tables.
