-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
@astrojs/mdx: “smart quotes” are broken in HTML headers #10859
Copy link
Copy link
Closed
Labels
needs triageIssue needs to be triagedIssue needs to be triaged
Description
Astro Info
Astro v4.6.4
Node v21.7.1
System macOS (arm64)
Package Manager npm
Output static
Adapter none
Integrations @astrojs/mdx
@astrojs/sitemap
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
When Astro renders an MDX page where a header contains "quotes", the rendering of ”smart quotes” in the output is broken: both quotes are rendered as the closing quote.
To reproduce
- Create a new project using the blog template,
npm create astro@latest. - Edit
/src/content/blog/using-mdx.mdx, line 10, to include double-straight-quotes:## "Why MDX?". npm run build.- The source of the built page contains incorrect quotes,
<h2 id="why-mdx">”Why MDX?”</h2>.
This is much more apparent when one uses a font with highly-stylised quotes. See my built page here for an example.
What's the expected result?
The header currently looks like this:
”Incorrect quotes”
It should look like this:
“Correct quotes”
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-vngmzc?file=src%2Fcontent%2Fblog%2Fusing-mdx.mdx
Participation
- I am willing to submit a pull request for this issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
needs triageIssue needs to be triagedIssue needs to be triaged