mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-14 01:27:35 +02:00
fix(utils): do not resolve Markdown paths with @site prefix (#6489)
This commit is contained in:
parent
8a912c708e
commit
556f59b193
3 changed files with 5 additions and 1 deletions
|
@ -65,7 +65,7 @@ export function replaceMarkdownLinks<T extends ContentPaths>({
|
|||
// This is [Document 1](doc1.md) -> we replace this doc1.md with correct link
|
||||
// [doc1]: doc1.md -> we replace this doc1.md with correct link
|
||||
const mdRegex =
|
||||
/(?:(?:\]\()|(?:\]:\s?))(?!https?:\/\/)([^'")\]\s>]+\.mdx?)/g;
|
||||
/(?:(?:\]\()|(?:\]:\s?))(?!https?:\/\/|@site\/)([^'")\]\s>]+\.mdx?)/g;
|
||||
let mdMatch = mdRegex.exec(modifiedLine);
|
||||
while (mdMatch !== null) {
|
||||
// Replace it to correct html link.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue