-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Closed
Closed
Copy link
Labels
bugAn error in the Docusaurus core causing instability or issues with its executionAn error in the Docusaurus core causing instability or issues with its executiondomain: markdownRelated to Markdown parsing or syntaxRelated to Markdown parsing or syntax
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
Prerequisites
- I'm using the latest version of Docusaurus.
- I have tried the
npm run clearoryarn clearcommand. - I have tried
rm -rf node_modules yarn.lock package-lock.jsonand re-installing packages. - I have tried creating a repro with https://new.docusaurus.io.
- I have read the console error message carefully (if applicable).
Description
Docusaurus checks for broken links inside tilde code blocks when onBrokenMarkdownLinks is set to throw
Reproducible demo
No response
Steps to reproduce
- create a new docusaurus site using
create-docusaurus - make sure that docusaurus.config.js contains
onBrokenLinks: 'throw', onBrokenMarkdownLinks: 'throw', - Add following content to
docs/intro.md``` this is an [invalid link](./path/to/a/page/that/does/not/exist.md) ``` - run
npx docusaurus buildto see the site build as expected - change the codeblock from step 3 to use ~ instead of ` ie
~~~ this is an [invalid link](./path/to/a/page/that/does/not/exist.md) ~~~ - run
npx docusaurus buildto see the build fail with an errorError: Docs markdown link couldn't be resolved: (./path/to/a/page/that/does/not/exist.md) in "/Users/foo/bar/baz/docusaurus/packages/testsite/docs/intro.md" for version current at Array.forEach (<anonymous>)
Expected behavior
Docusaurus either does not check links inside codeblock or checks them for both backtick and tilde codeblocks when onBrokenMarkdownLinks is set to throw
Actual behavior
Docusaurus errors for broken markdown links only inside tilde codeblocks when onBrokenMarkdownLinks is set to throw
Your environment
- Public source code: NA
- Public site URL: NA
- Docusaurus version used: Can reproduce with 2.0.0-beta.21 and 2.0.0-rc.1
- Environment name and version (e.g. Chrome 89, Node.js 16.4): Node.js 16.4
- Operating system and version (e.g. Ubuntu 20.04.2 LTS): Macos
Self-service
- I'd be willing to fix this bug myself.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugAn error in the Docusaurus core causing instability or issues with its executionAn error in the Docusaurus core causing instability or issues with its executiondomain: markdownRelated to Markdown parsing or syntaxRelated to Markdown parsing or syntax