-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
bug resolving multiple markdown links on the same line #9161
Comments
Your error message and Markdown source don't match: the links are |
I'm not sure to understand what you mean here 🤔 Looks like I can reproduce the issue, and it only happens on the first link of a given line? https://stackblitz.com/edit/github-zg75tv?file=docs%2Fintro.md |
I included this line from my source code: The setup of these Macs is described both in [003_aws_mac_manual_setup](./003_aws_mac_manual_setup.md) and [006_aws_mac_ansible_setup.md](./006_aws_mac_ansible_setup.md). Please note that there are two correctly formatted markdown links, but yet the error seems to be attempting to glob them together into one. |
The site actually fails to render for me at all, so you've gotten further than I have. This is what I see in the frontend (running a site with |
I can also reproduce this bug on the React-Native website, and not sure it happened before the 2.4.1 upgrade. Example line that produces the problem is not even using the After this, you will be able to continue to [Native Modules (iOS)](native-modules-ios) or [Native Modules (Android)](native-modules-android) to add in some code. Make sure to read the README.md within your `MyLibrary` Directory for platform-specific instructions on how to include the project. Note, this issue is somehow related to #9048 and happens because we use a buggy Regexp instead of processing links through the AST. We'll probably fix the Regexp for now but in the long term we should use a more robust method using the AST instead. |
Does this reproduce in 3.0? Because #8927 is not backported. |
I'm not sure I remember seeing this error, will investigate next week and test this PR changes against the RNW website to see if it works and is safe to backport. |
This bug exists on version 2.4.3 as well. |
Yes the fix hasn't been backported unfortunately. If we do another 2.x release I may try to backport it, otherwise you can try the v3 beta already: I'm writing the material to let you know how to upgrade right now and it will be published soon. |
This bug is already fixed in v3.0 beta, cf https://stackblitz.com/edit/github-zg75tv?file=package.json |
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clear
oryarn clear
command.rm -rf node_modules yarn.lock package-lock.json
and re-installing packages.Description
Since upgrading to 2.4.1 in a dev environment, I have started to get compilation errors relating to markdown links. This bug is not present on 2.4.0.
Example error:
The line in question:
I am seeing other compilation errors of the same type as this example, all in cases where a single line of a markdown file contains more than one relative link to another markdown file. The file name does not seem to make a difference; I have examples using numbers, alphanumerics, and escaped special characters in multiple orientations.
Reproducible demo
No response
Steps to reproduce
docusaurus start
Expected behavior
Site compiles and resolves all valid markdown links
Actual behavior
Compilation errors, site unusable
Your environment
Self-service
The text was updated successfully, but these errors were encountered: