-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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 do not work after using JSX in the same line #4890
Comments
So, your doc is:
It also fails in the MDX playground: https://mdxjs.com/playground/ It is not a Docusaurus bug, but a MDX limitation, and you should discuss that on the MDX repo instead. You can use a If you don't mind having a line break (additional markdown paragraph), it's still possible to interleave markdown inside mdx by using line breaks: # Example
export const Hello = function({children}) {
return (
<>
<span>Hello</span>
{children}
<span>Hello</span>
</>
);
}
<Hello>
[link](./tutorial-basics/create-a-page.md)
</Hello> We use something like that to display code blocks in tabs for example: |
Something worth mentionning: using text before your JSX will make MDX work 😅 not sure how to remove the text prefix Hey <Hello />! [link](./tutorial-basics/create-a-page.md) <Hello />! |
This is how MDX 1 is intended to work (more context at mdx-js/mdx#1571 (comment)). |
🐛 Bug Report
Prerequisites
npm run clear
oryarn clear
command.rm -rf node_modules yarn.lock package-lock.json
and re-installing packages.Description
After using a JSX component, it is not possible to use markdown links within the same line. The plain markdown text is shown instead.
Have you read the Contributing Guidelines on issues?
Yes
To Reproduce
https://codesandbox.io/s/link-bug-99smz
Navigate to the docs page /docs/intro
(Write your steps here:)
<tag>jsx</tag>
[link](page.md)
Expected behavior
The link would be a clickable link as usual.
Actual Behavior
The link was not converted to HTML
Reproducible Demo
https://codesandbox.io/s/link-bug-99smz
Navigate to the docs page /docs/intro
The text was updated successfully, but these errors were encountered: