@docusaurus/utils 0.0.0-4556 → 0.0.0-4561
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/markdownLinks.js +1 -1
- package/package.json +8 -13
- package/src/deps.d.ts +0 -4
- package/src/markdownLinks.ts +1 -1
package/lib/markdownLinks.js
CHANGED
|
@@ -36,7 +36,7 @@ function replaceMarkdownLinks({ siteDir, fileString, filePath, contentPaths, sou
|
|
|
36
36
|
// This is [Document 1](doc1.md) -> we replace this doc1.md with correct
|
|
37
37
|
// ink
|
|
38
38
|
// [doc1]: doc1.md -> we replace this doc1.md with correct link
|
|
39
|
-
const mdRegex = /(?:(?:\]\()|(?:\]:\s
|
|
39
|
+
const mdRegex = /(?:(?:\]\()|(?:\]:\s*))(?!https?:\/\/|@site\/)(?<filename>[^'")\]\s>]+\.mdx?)/g;
|
|
40
40
|
let mdMatch = mdRegex.exec(modifiedLine);
|
|
41
41
|
while (mdMatch !== null) {
|
|
42
42
|
// Replace it to correct html link.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/utils",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-4561",
|
|
4
4
|
"description": "Node utility functions for Docusaurus packages.",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -18,8 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@docusaurus/logger": "0.0.0-
|
|
22
|
-
"@mdx-js/runtime": "^1.6.22",
|
|
21
|
+
"@docusaurus/logger": "0.0.0-4561",
|
|
23
22
|
"@svgr/webpack": "^6.0.0",
|
|
24
23
|
"file-loader": "^6.2.0",
|
|
25
24
|
"fs-extra": "^10.0.0",
|
|
@@ -29,29 +28,25 @@
|
|
|
29
28
|
"js-yaml": "^4.0.0",
|
|
30
29
|
"lodash": "^4.17.20",
|
|
31
30
|
"micromatch": "^4.0.4",
|
|
32
|
-
"remark-mdx-remove-exports": "^1.6.22",
|
|
33
|
-
"remark-mdx-remove-imports": "^1.6.22",
|
|
34
31
|
"resolve-pathname": "^3.0.0",
|
|
35
32
|
"tslib": "^2.3.1",
|
|
36
|
-
"url-loader": "^4.1.1"
|
|
33
|
+
"url-loader": "^4.1.1",
|
|
34
|
+
"webpack": "^5.68.0"
|
|
37
35
|
},
|
|
38
36
|
"engines": {
|
|
39
37
|
"node": ">=14"
|
|
40
38
|
},
|
|
41
39
|
"devDependencies": {
|
|
42
|
-
"@docusaurus/types": "0.0.0-
|
|
40
|
+
"@docusaurus/types": "0.0.0-4561",
|
|
43
41
|
"@types/dedent": "^0.7.0",
|
|
44
42
|
"@types/github-slugger": "^1.3.0",
|
|
45
43
|
"@types/micromatch": "^4.0.2",
|
|
46
44
|
"@types/react-dom": "^17.0.1",
|
|
47
|
-
"dedent": "^0.7.0"
|
|
48
|
-
"tslib": "^2.3.1"
|
|
45
|
+
"dedent": "^0.7.0"
|
|
49
46
|
},
|
|
50
47
|
"peerDependencies": {
|
|
51
|
-
"@babel/core": "^7.0.0",
|
|
52
48
|
"react": "*",
|
|
53
|
-
"react-dom": "*"
|
|
54
|
-
"webpack": "^5.0.0"
|
|
49
|
+
"react-dom": "*"
|
|
55
50
|
},
|
|
56
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "d3f1df862e0e65e8427f9ed6e09e80eac7aff3cd"
|
|
57
52
|
}
|
package/src/deps.d.ts
CHANGED
package/src/markdownLinks.ts
CHANGED
|
@@ -67,7 +67,7 @@ export function replaceMarkdownLinks<T extends ContentPaths>({
|
|
|
67
67
|
// ink
|
|
68
68
|
// [doc1]: doc1.md -> we replace this doc1.md with correct link
|
|
69
69
|
const mdRegex =
|
|
70
|
-
/(?:(?:\]\()|(?:\]:\s
|
|
70
|
+
/(?:(?:\]\()|(?:\]:\s*))(?!https?:\/\/|@site\/)(?<filename>[^'")\]\s>]+\.mdx?)/g;
|
|
71
71
|
let mdMatch = mdRegex.exec(modifiedLine);
|
|
72
72
|
while (mdMatch !== null) {
|
|
73
73
|
// Replace it to correct html link.
|