-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
markdown links with one preceding pair of brackets are not rendered correctly #4801
Comments
Can you tell me why you need the empty brackets? |
Hi @nam-hle, Generating a website with docusaurus from this markdown would not display the link to Alertmanager correctly. |
@leonnicolas I agree that the way it is rendered is surprising. However, I still don't understand why you want to use double brackets like that. What is your intent? Is it a bug in your auto-generation system and somehow you expect Docusaurus to handle it better than it currently does? This is a behavior of MDX, our markdown+React parser, and unfortunately, I don't think we can fix it in the Docusaurus repo. And track this issue for when we upgrade MDX (as it might solve the issue): |
It is not a bug in the auto-generation.
Thank you, I was not aware that you were using this parser. When I found https://github.com/facebook/docusaurus/blob/master/packages/docusaurus-utils/src/markdownParser.ts I though you were using dark magic to parse the markdown. |
We are converting markdown to JSX in the mdx loader here if that helps: https://github.com/facebook/docusaurus/blob/master/packages/docusaurus-mdx-loader/src/index.js#L67 |
Yes, v2 of MDX will solve the Issue mdx-js/mdx#1559 |
🐛 Bug Report
[][link](#some-title)
is rendered to[][link](#some-title)
Links with an even number of preceding bracket pairs are rendered correctly.
Links with an odd number of preceding bracket pairs are not rendered correctly.
Pandoc, github, https://github.com/mity/md4c and docusaurus 1 render these links correctly.
Have you read the Contributing Guidelines on issues?
Yes
To Reproduce
[][link](#fast-track)
intowebsite/docs/introduction.md
yarn start
http://localhost:3000/docs/
[][link](#fast-track)
Expected behavior
I expected to see
[]link
Actual Behavior
I actually saw
[][link](#fast-track)
Your Environment
Reproducible Demo
https://codesandbox.io/s/epic-bash-ok5qk?file=/docs/intro.md
and navigate to Tutorial Intro. The broken link is the next line after the title
The text was updated successfully, but these errors were encountered: