-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
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
MDX loader: linkify should process the md AST instead of the md string #9048
Labels
apprentice
Issues that are good candidates to be handled by a Docusaurus apprentice / trainee
domain: markdown
Related to Markdown parsing or syntax
proposal
This issue is a proposal, usually non-trivial change
Milestone
Comments
slorber
added
proposal
This issue is a proposal, usually non-trivial change
status: needs triage
This issue has not been triaged by maintainers
and removed
status: needs triage
This issue has not been triaged by maintainers
labels
Jun 8, 2023
This was referenced Jun 8, 2023
See previous attempt: #6261 |
7 tasks
slorber
added
the
apprentice
Issues that are good candidates to be handled by a Docusaurus apprentice / trainee
label
Sep 25, 2023
7 tasks
7 tasks
7 tasks
Another case it would fix is a bug when using relative md links on markdown images: [text](./installation.mdx)
[![alt](/img/slash-introducing.svg)](./installation.mdx) Only the first link resolves. But reported here: #9720 (comment), that should also be solved by this proposed solution. |
8 tasks
Another case reported where markdown links resolution fails due to usage of inline code blocks with triple backticks (TIL this exists and is supported by MDX 😅). #9876 ```something```
[test](test.md) |
This was referenced Apr 25, 2024
Closed
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
7 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
apprentice
Issues that are good candidates to be handled by a Docusaurus apprentice / trainee
domain: markdown
Related to Markdown parsing or syntax
proposal
This issue is a proposal, usually non-trivial change
Have you read the Contributing Guidelines on issues?
Motivation
Our current MDX loader code looks like this:
The
linkify
process that turns[link](./xyz.md)
to[link](/baseUrl/xyz-pathname)
is based on string manipulations and regexes.As a result, linkify has many edge case bugs related to the unability to properly resolve markdown relative file path links such as
[](./relative-path.md)
We should instead do this with a Remark plugin after MDX has parsed the string.
See also:
Self-service
The text was updated successfully, but these errors were encountered: