Parsing error when a component is used within a markdown list
See original GitHub issueSubject of the issue
The following code:
- <LinkTo kind="docs-packages-vuetify-preset" story="page">
Vuetify preset
</LinkTo>
: some extra text describing the preset
Trigger an error on line 3:
</LinkTo>
^^^^^^
Parsing error: '>' expected.
Adding an empty line between the last two lines fixes the issue, but the rendered output is not the same. Also putting it all in a single line works, but it’s not “Prettier compliant” and gets reformatted on multiple lines. If the same code is placed at the root (not within a markdown list), it works as well.
It does pretty much the same with a regular element instead of a component, but the error is different:
Parsing error: Identifier expected
Note that the code compiles properly, the problem is only at EsLint level.
Your environment
- OS: macOS 10.15.7
- Packages: eslint-plugin-mdx 1.9.0
- Env: Node 14.16.0, npm 6.14.11
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (8 by maintainers)
Top Results From Across the Web
Markdown list error: </li> attempted to close an element that ...
I'm trying to use some markdown inside Svelte components, and it mostly works fine, e.g.:
Read more >Code blocks in mdx throw errors due to code parsing
This happens on a post where I am writing about classes and functional react components and in one of my examples I have...
Read more >6 Deciphering Common R Errors | Getting Used to R, RStudio ...
This error usually occurs when your R Markdown document refers to an object that has not been defined in an R chunk at...
Read more >How to safely render Markdown using react-markdown
Learn how to safely render Markdown syntax to the appropriate HTML with this short react-markdown tutorial.
Read more >Troubleshooting MDX
Could not parse import/exports with acorn: $error ... The reason for this error is that the parser is expecting a JavaScript import or...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@LeBenLeBen Temporary workaround:
Sorry, I can’t fix it easily due to
remark-mdx
itself. Let’s wait for @wooorm’s response.Perfect, it works now. Thank you for looking into this so quickly 💯