Skip to content

Commit e3834d2

Browse files
committed
fix: upgrade docsify
1 parent 1d86762 commit e3834d2

File tree

14 files changed

+9855
-4136
lines changed

14 files changed

+9855
-4136
lines changed

docs/_scripts/lib/docsify.js

Lines changed: 9752 additions & 4129 deletions
Large diffs are not rendered by default.

docs/_scripts/lib/docsify.min.js

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

docs/_scripts/lib/plugins/docsify-darklight-theme.min.css

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// https://www.json.org/json-en.html
2+
Prism.languages.json = {
3+
'property': {
4+
pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,
5+
lookbehind: true,
6+
greedy: true
7+
},
8+
'string': {
9+
pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,
10+
lookbehind: true,
11+
greedy: true
12+
},
13+
'comment': {
14+
pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,
15+
greedy: true
16+
},
17+
'number': /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,
18+
'punctuation': /[{}[\],]/,
19+
'operator': /:/,
20+
'boolean': /\b(?:false|true)\b/,
21+
'null': {
22+
pattern: /\bnull\b/,
23+
alias: 'keyword'
24+
}
25+
};
26+
27+
Prism.languages.webmanifest = Prism.languages.json;

docs/_scripts/lib/plugins/prism-json.min.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
(function (Prism) {
2+
3+
Prism.languages.typescript = Prism.languages.extend('javascript', {
4+
'class-name': {
5+
pattern: /(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,
6+
lookbehind: true,
7+
greedy: true,
8+
inside: null // see below
9+
},
10+
'builtin': /\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/,
11+
});
12+
13+
// The keywords TypeScript adds to JavaScript
14+
Prism.languages.typescript.keyword.push(
15+
/\b(?:abstract|declare|is|keyof|readonly|require)\b/,
16+
// keywords that have to be followed by an identifier
17+
/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,
18+
// This is for `import type *, {}`
19+
/\btype\b(?=\s*(?:[\{*]|$))/
20+
);
21+
22+
// doesn't work with TS because TS is too complex
23+
delete Prism.languages.typescript['parameter'];
24+
delete Prism.languages.typescript['literal-property'];
25+
26+
// a version of typescript specifically for highlighting types
27+
var typeInside = Prism.languages.extend('typescript', {});
28+
delete typeInside['class-name'];
29+
30+
Prism.languages.typescript['class-name'].inside = typeInside;
31+
32+
Prism.languages.insertBefore('typescript', 'function', {
33+
'decorator': {
34+
pattern: /@[$\w\xA0-\uFFFF]+/,
35+
inside: {
36+
'at': {
37+
pattern: /^@/,
38+
alias: 'operator'
39+
},
40+
'function': /^[\s\S]+/
41+
}
42+
},
43+
'generic-function': {
44+
// e.g. foo<T extends "bar" | "baz">( ...
45+
pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,
46+
greedy: true,
47+
inside: {
48+
'function': /^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,
49+
'generic': {
50+
pattern: /<[\s\S]+/, // everything after the first <
51+
alias: 'class-name',
52+
inside: typeInside
53+
}
54+
}
55+
}
56+
});
57+
58+
Prism.languages.ts = Prism.languages.typescript;
59+
60+
}(Prism));

docs/_scripts/lib/plugins/prism-typescript.min.js

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

docs/_scripts/lib/plugins/prism.min.css

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

docs/_scripts/lib/themes/buble.css

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

docs/_scripts/lib/themes/dark.css

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

docs/_scripts/lib/themes/pure.css

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

docs/_scripts/lib/themes/vue.css

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

docs/index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767

6868
<!-- Other Styles -->
6969
<link rel="stylesheet" href="_scripts/lib/themes/vue.css" />
70+
<link rel="stylesheet" href="_scripts/lib/plugins/prism.min.css">
7071
<link
7172
rel="stylesheet"
7273
href="_scripts/lib/plugins/docsify-darklight-theme.min.css"
@@ -320,6 +321,8 @@
320321
<script src="_scripts/lib/plugins/emoji.min.js"></script>
321322
<script src="_scripts/lib/plugins/docsify-copy-code.min.js"></script>
322323
<script src="_scripts/lib/plugins/progress.min.js"></script>
324+
<script src="_scripts/lib/plugins/prism-typescript.min.js"></script>
325+
<script src="_scripts/lib/plugins/prism-json.min.js"></script>
323326
<script src="_scripts/lib/plugins/docsify-darklight-theme.min.js"></script>
324327
<script src="_scripts/lib/plugins/gitalk.min.js"></script>
325328
<script type="module" src="_scripts/modules/main.mjs"></script>

docs/sw.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'
22

3-
const version = 'wuxui_3.11.3_20240425_force'
3+
const version = 'wuxui_3.11.3_20240427_force'
44
const __DEVELOPMENT__ = false
55
const __DEBUG__ = false
66
const offlineResources = [

0 commit comments

Comments
 (0)