Skip to content

Commit 71bfe93

Browse files
authored
Merge branch 'master' into markedjs-patch-v4
2 parents 7d035ce + 141ac96 commit 71bfe93

File tree

9 files changed

+32
-6
lines changed

9 files changed

+32
-6
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
## [4.13.1](https://github.com/docsifyjs/docsify/compare/v4.13.0...v4.13.1) (2023-06-24)
2+
3+
4+
### Bug Fixes
5+
6+
* enhancement of isExternal ([#2093](https://github.com/docsifyjs/docsify/issues/2093)) ([6a7d15b](https://github.com/docsifyjs/docsify/commit/6a7d15b1d5b93e19d3cf9a328cdbf5f1a166b5bd))
7+
* fix cross-origin links in history router mode ([#1967](https://github.com/docsifyjs/docsify/issues/1967)) ([2312fee](https://github.com/docsifyjs/docsify/commit/2312feef459211a8bcdcbf9164a9ffe051609b70))
8+
* genIndex error for search ([#1933](https://github.com/docsifyjs/docsify/issues/1933)) ([68d8735](https://github.com/docsifyjs/docsify/commit/68d873587c29d694ece466177984aa5fd739dd4b))
9+
10+
11+
112
# [4.13.0](https://github.com/docsifyjs/docsify/compare/v4.12.4...v4.13.0) (2022-10-26)
213

314

docs/_coverpage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
![logo](_media/icon.svg)
22

3-
# docsify <small>4.13.0</small>
3+
# docsify <small>4.13.1</small>
44

55
> A magical documentation site generator.
66

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "docsify",
3-
"version": "4.13.0",
3+
"version": "4.13.1",
44
"description": "A magical documentation generator.",
55
"author": {
66
"name": "qingwei-li",

packages/docsify-server-renderer/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/docsify-server-renderer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "docsify-server-renderer",
3-
"version": "4.13.0",
3+
"version": "4.13.1",
44
"description": "docsify server renderer",
55
"author": {
66
"name": "qingwei-li",

src/core/util/core.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,5 +96,8 @@ export function isExternal(url) {
9696
) {
9797
return true;
9898
}
99+
if (/^\/\\/.test(url)) {
100+
return true;
101+
}
99102
return false;
100103
}

test/integration/__snapshots__/docs.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`Docs Site coverpage renders and is unchanged 1`] = `
4-
"<section class=\\"cover show\\" style=\\"background: linear-gradient(to left bottom, hsl(127, 100%, 85%) 0%,hsl(127, 100%, 85%) 100%)\\"><div class=\\"mask\\"></div><div class=\\"cover-main\\"><p><img src=\\"http://127.0.0.1:3001/_media/icon.svg\\" data-origin=\\"_media/icon.svg\\" alt=\\"logo\\"></p><h1 id=\\"docsify-4130\\"><a href=\\"#/?id=docsify-4130\\" data-id=\\"docsify-4130\\" class=\\"anchor\\"><span>docsify <small>4.13.0</small></span></a></h1><blockquote>
4+
"<section class=\\"cover show\\" style=\\"background: linear-gradient(to left bottom, hsl(127, 100%, 85%) 0%,hsl(127, 100%, 85%) 100%)\\"><div class=\\"mask\\"></div><div class=\\"cover-main\\"><p><img src=\\"http://127.0.0.1:3001/_media/icon.svg\\" data-origin=\\"_media/icon.svg\\" alt=\\"logo\\"></p><h1 id=\\"docsify-4131\\"><a href=\\"#/?id=docsify-4131\\" data-id=\\"docsify-4131\\" class=\\"anchor\\"><span>docsify <small>4.13.1</small></span></a></h1><blockquote>
55
<p>A magical documentation site generator.</p></blockquote>
66
<ul><li>Simple and lightweight</li><li>No statically built html files</li><li>Multiple themes</li></ul><p><a href=\\"https://github.com/docsifyjs/docsify/\\" target=\\"_blank\\" rel=\\"noopener\\">GitHub</a>
77
<a href=\\"#/?id=docsify\\">Getting Started</a></p></div></section>"

test/unit/core-util.test.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,17 @@ describe('core/util', () => {
5959

6060
expect(result).toBeTruthy();
6161
});
62+
63+
test('external url with one \\', () => {
64+
const result = isExternal('/\\example.github.io/docsify/demo.md');
65+
66+
expect(result).toBeTruthy();
67+
});
68+
69+
test('external url with two \\', () => {
70+
const result = isExternal('/\\\\example.github.io/docsify/demo.md');
71+
72+
expect(result).toBeTruthy();
73+
});
6274
});
6375
});

0 commit comments

Comments
 (0)