mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-11 08:07:26 +02:00
Fix markdown html link replacement
This commit is contained in:
parent
aba6e93c5d
commit
d2eaf04ec7
1 changed files with 5 additions and 2 deletions
|
@ -202,11 +202,14 @@ function execute(port) {
|
||||||
link = link.replace("/en/", "/" + language + "/");
|
link = link.replace("/en/", "/" + language + "/");
|
||||||
link = link.replace(
|
link = link.replace(
|
||||||
"/VERSION/",
|
"/VERSION/",
|
||||||
metadata.version && (metadata.version !== latestVersion)
|
metadata.version && metadata.version !== latestVersion
|
||||||
? "/" + metadata.version + "/"
|
? "/" + metadata.version + "/"
|
||||||
: "/"
|
: "/"
|
||||||
);
|
);
|
||||||
rawContent = rawContent.replace(new RegExp(key, "g"), link);
|
rawContent = rawContent.replace(
|
||||||
|
new RegExp("\\]\\(" + key, "g"),
|
||||||
|
"](" + link
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
rawContent = rawContent.replace(
|
rawContent = rawContent.replace(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue