Markdown link text split across newline breaks filepath-to-urlpath conversion #9636
Closed
6 of 7 tasks
Labels
bug
An error in the Docusaurus core causing instability or issues with its execution
closed: duplicate
This issue or pull request already exists in another issue or pull request
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
If a markdown link spans more than one line, the filepath-to-urlpath conversion mentioned here (https://docusaurus.io/docs/markdown-features/links) does not work.
There's a CodeSandbox repro below, which effectively shows:
Splitting link text across lines is valid markdown. It doesn't seem like formatting with prettier breaks link text across multiple lines (i.e. to obey a line width limit), but other tools do, which can lead to this issue unexpectedly breaking the link without any sort of error or warning.
Reproducible demo
https://codesandbox.io/p/devbox/stupefied-mclaren-55crfh
Steps to reproduce
other-page.md
, but only the first is converted to point to /docs/other-pageExpected behavior
The markdown loader should convert relative links to files into url paths, regardless of the formatting of the link text.
Actual behavior
Relative links to files are not converted into url paths if the link text spans multiple lines.
Your environment
Self-service
The text was updated successfully, but these errors were encountered: