-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Closed
Labels
- P2: nice to haveNot breaking anything but nice to have (priority)Not breaking anything but nice to have (priority)feat: errorsRelated to error handling / messages (scope)Related to error handling / messages (scope)good first issueGood for newcomers. If you need additional guidance, feel free to post in #contribute on DiscordGood for newcomers. If you need additional guidance, feel free to post in #contribute on Discord
Description
Astro Info
Astro v5.16.6
Vite v6.4.1
Node v25.2.1
System Windows (x64)
Package Manager npm
Output static
Adapter none
Integrations @astrojs/mdx (v4.3.13)
@astrojs/svelte (v7.2.4)
@astrojs/sitemap (v3.6.0)
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
I was porting over a markdown file from Eleventy to a MDX file in Astro, and one of the lines was:
- <https://example.com> - Auto-linked URLThis works in Markdown but not MDX, and it correctly throws an error message. However, the error message is garbled at the end:
Unexpected character / (U+002F) before local name, expected a character that can start a name, such as a letter, $, or _ (note: to create a link in MDX, use [text](http://localhost:4321/url)%3C/code%3E)
(Note the markdown at the end is rendered as just text and does not show the full intended link syntax. The text link points incorrectly to http://localhost:4321/url)%3C/code%3E).
What's the expected result?
The error message should correctly show the intended syntax for a link instead of just rendering as a text link. Something like this:
Link to Minimal Reproducible Example
Participation
- I am willing to submit a pull request for this issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
- P2: nice to haveNot breaking anything but nice to have (priority)Not breaking anything but nice to have (priority)feat: errorsRelated to error handling / messages (scope)Related to error handling / messages (scope)good first issueGood for newcomers. If you need additional guidance, feel free to post in #contribute on DiscordGood for newcomers. If you need additional guidance, feel free to post in #contribute on Discord
