@kg-ui/kg-ui-plus 0.0.0 → 0.0.1
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/README.md +2 -38
- package/package.json +1 -2
- package/dist/es/KgCopilot/CopiContent/AnswerHead.vue.mjs +0 -16
- package/dist/es/KgCopilot/CopiContent/AnswerHead.vue2.mjs +0 -4
- package/dist/es/KgCopilot/CopiContent/UserHead.vue.mjs +0 -26
- package/dist/es/KgCopilot/CopiContent/UserHead.vue2.mjs +0 -4
- package/dist/es/KgCopilot/CopiFooter/components/NewTheme.vue.mjs +0 -7
- package/dist/es/KgCopilot/CopiFooter/components/NewTheme.vue2.mjs +0 -49
- package/dist/es/KgCopilot/CopiFooter/components/NewTheme.vue3.mjs +0 -4
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SelectPlugin.vue.mjs +0 -7
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SelectPlugin.vue2.mjs +0 -94
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SelectPlugin.vue3.mjs +0 -4
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SpeechControl.vue.mjs +0 -7
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SpeechControl.vue2.mjs +0 -33
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SpeechControl.vue3.mjs +0 -4
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/Upload.vue.mjs +0 -7
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/Upload.vue2.mjs +0 -140
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/Upload.vue3.mjs +0 -4
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/index.vue.mjs +0 -7
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/index.vue2.mjs +0 -131
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/index.vue3.mjs +0 -4
- package/dist/es/KgCopilot/CopiFooter/index.vue.mjs +0 -7
- package/dist/es/KgCopilot/CopiFooter/index.vue2.mjs +0 -21
- package/dist/es/KgCopilot/CopiFooter/index.vue3.mjs +0 -4
- package/dist/es/KgCopilot/dialogue.vue.mjs +0 -7
- package/dist/es/KgCopilot/dialogue.vue2.mjs +0 -131
- package/dist/es/KgCopilot/dialogue.vue3.mjs +0 -4
- package/dist/es/KgCopilot/index.vue.mjs +0 -7
- package/dist/es/KgCopilot/index.vue2.mjs +0 -49
- package/dist/es/KgCopilot/index.vue3.mjs +0 -4
- package/dist/es/KgCopilot/mdInCode.mjs +0 -56
- package/dist/es/KgCopilot/readMd.vue.mjs +0 -7
- package/dist/es/KgCopilot/readMd.vue2.mjs +0 -87
- package/dist/es/KgCopilot/readMd.vue3.mjs +0 -4
- package/dist/es/ReIcon/index.mjs +0 -11
- package/dist/es/ReIcon/src/iconfont.mjs +0 -46
- package/dist/es/ReIcon/src/iconifyIconOffline.mjs +0 -30
- package/dist/es/ReIcon/src/iconifyIconOnline.mjs +0 -29
- package/dist/es/_virtual/___vite-browser-external.mjs +0 -6
- package/dist/es/_virtual/__vite-browser-external.mjs +0 -4
- package/dist/es/_virtual/_commonjsHelpers.mjs +0 -34
- package/dist/es/_virtual/_plugin-vue_export-helper.mjs +0 -10
- package/dist/es/_virtual/index.mjs +0 -13
- package/dist/es/api/project.mjs +0 -51
- package/dist/es/directives/heighlight/index.mjs +0 -69
- package/dist/es/directives/index.mjs +0 -4
- package/dist/es/home/LFilter/FilterArea.vue.mjs +0 -7
- package/dist/es/home/LFilter/FilterArea.vue2.mjs +0 -507
- package/dist/es/home/LFilter/FilterArea.vue3.mjs +0 -4
- package/dist/es/home/LFilter/FilterHead.vue.mjs +0 -129
- package/dist/es/home/LFilter/FilterHead.vue2.mjs +0 -4
- package/dist/es/home/LFilter/FilterItem.vue.mjs +0 -7
- package/dist/es/home/LFilter/FilterItem.vue2.mjs +0 -114
- package/dist/es/home/LFilter/FilterItem.vue3.mjs +0 -4
- package/dist/es/home/LFilter/FilterItemIcon.vue.mjs +0 -7
- package/dist/es/home/LFilter/FilterItemIcon.vue2.mjs +0 -171
- package/dist/es/home/LFilter/FilterItemIcon.vue3.mjs +0 -4
- package/dist/es/home/LFilter/index.vue.mjs +0 -17
- package/dist/es/home/LFilter/index.vue2.mjs +0 -4
- package/dist/es/home/LProject/index.vue.mjs +0 -7
- package/dist/es/home/LProject/index.vue2.mjs +0 -70
- package/dist/es/home/LProject/index.vue3.mjs +0 -4
- package/dist/es/home/index.vue.mjs +0 -7
- package/dist/es/home/index.vue2.mjs +0 -80
- package/dist/es/home/index.vue3.mjs +0 -4
- package/dist/es/index.mjs +0 -36
- package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/check.mjs +0 -8
- package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/circle-plus.mjs +0 -8
- package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/close.mjs +0 -8
- package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/microphone.mjs +0 -8
- package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/paperclip.mjs +0 -8
- package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/promotion.mjs +0 -8
- package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/upload.mjs +0 -8
- package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/copy-simple.mjs +0 -8
- package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/speaker-high-light.mjs +0 -8
- package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/thumbs-down-thin.mjs +0 -8
- package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/thumbs-up-thin.mjs +0 -8
- package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/warning-bold.mjs +0 -8
- package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/add-line.mjs +0 -8
- package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/arrow-down-s-line.mjs +0 -8
- package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/arrow-up-s-line.mjs +0 -8
- package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/check-fill.mjs +0 -8
- package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/download-line.mjs +0 -8
- package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/more-2-fill.mjs +0 -8
- package/dist/es/node_modules/.pnpm/@iconify_vue@4.0.0_vue@3.2.45/node_modules/@iconify/vue/dist/iconify.mjs +0 -1702
- package/dist/es/node_modules/.pnpm/@iconify_vue@4.0.0_vue@3.2.45/node_modules/@iconify/vue/dist/offline.mjs +0 -436
- package/dist/es/node_modules/.pnpm/@pureadmin_utils@1.8.5_vue@3.2.45/node_modules/@pureadmin/utils/dist/index.mjs +0 -70
- package/dist/es/node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/callBound.mjs +0 -16
- package/dist/es/node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/index.mjs +0 -36
- package/dist/es/node_modules/.pnpm/define-data-property@1.1.4/node_modules/define-data-property/index.mjs +0 -48
- package/dist/es/node_modules/.pnpm/dompurify@3.0.10/node_modules/dompurify/dist/purify.es.mjs +0 -949
- package/dist/es/node_modules/.pnpm/es-define-property@1.0.0/node_modules/es-define-property/index.mjs +0 -22
- package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.mjs +0 -4
- package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.mjs +0 -4
- package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.mjs +0 -4
- package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.mjs +0 -4
- package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.mjs +0 -4
- package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.mjs +0 -4
- package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.mjs +0 -4
- package/dist/es/node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.mjs +0 -72
- package/dist/es/node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.mjs +0 -6
- package/dist/es/node_modules/.pnpm/get-intrinsic@1.2.4/node_modules/get-intrinsic/index.mjs +0 -320
- package/dist/es/node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.mjs +0 -14
- package/dist/es/node_modules/.pnpm/has-property-descriptors@1.0.2/node_modules/has-property-descriptors/index.mjs +0 -19
- package/dist/es/node_modules/.pnpm/has-proto@1.0.3/node_modules/has-proto/index.mjs +0 -11
- package/dist/es/node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.mjs +0 -21
- package/dist/es/node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.mjs +0 -48
- package/dist/es/node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.mjs +0 -8
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/core.mjs +0 -5
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/apache.mjs +0 -91
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/bash.mjs +0 -377
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/basic.mjs +0 -221
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/c.mjs +0 -280
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/css.mjs +0 -732
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/dart.mjs +0 -247
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/django.mjs +0 -47
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/dns.mjs +0 -71
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/dos.mjs +0 -160
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/dust.mjs +0 -38
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/erlang.mjs +0 -176
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/go.mjs +0 -135
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/http.mjs +0 -89
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/java.mjs +0 -254
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/javascript.mjs +0 -698
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/json.mjs +0 -40
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/markdown.mjs +0 -227
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/nginx.mjs +0 -144
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/php.mjs +0 -589
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/python.mjs +0 -414
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/ruby.mjs +0 -414
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/stylus.mjs +0 -766
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/swift.mjs +0 -832
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/typescript.mjs +0 -788
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/xml.mjs +0 -227
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/lib/core.mjs +0 -1580
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/styles/paraiso-light.css.mjs +0 -4
- package/dist/es/node_modules/.pnpm/marked@12.0.1/node_modules/marked/lib/marked.esm.mjs +0 -2045
- package/dist/es/node_modules/.pnpm/object-inspect@1.13.1/node_modules/object-inspect/index.mjs +0 -514
- package/dist/es/node_modules/.pnpm/pinyin-match@1.2.4/node_modules/pinyin-match/es/main.mjs +0 -124
- package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/formats.mjs +0 -22
- package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/index.mjs +0 -14
- package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/parse.mjs +0 -199
- package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/stringify.mjs +0 -262
- package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/utils.mjs +0 -196
- package/dist/es/node_modules/.pnpm/set-function-length@1.2.2/node_modules/set-function-length/index.mjs +0 -54
- package/dist/es/node_modules/.pnpm/side-channel@1.0.6/node_modules/side-channel/index.mjs +0 -115
- package/dist/es/store/index.mjs +0 -8
- package/dist/es/store/modules/copilot.mjs +0 -108
- package/dist/es/store/modules/filters.mjs +0 -346
- package/dist/es/store/modules/types.mjs +0 -19
- package/dist/es/style/index.scss.mjs +0 -4
- package/dist/es/style/tailwind.css.mjs +0 -4
- package/dist/es/style.css +0 -1
- package/dist/es/utils/home.mjs +0 -129
- package/dist/es/utils/http/index.mjs +0 -90
- package/dist/es/utils/message.mjs +0 -42
@@ -1,40 +0,0 @@
|
|
1
|
-
function json(hljs) {
|
2
|
-
const ATTRIBUTE = {
|
3
|
-
className: "attr",
|
4
|
-
begin: /"(\\.|[^\\"\r\n])*"(?=\s*:)/,
|
5
|
-
relevance: 1.01
|
6
|
-
};
|
7
|
-
const PUNCTUATION = {
|
8
|
-
match: /[{}[\],:]/,
|
9
|
-
className: "punctuation",
|
10
|
-
relevance: 0
|
11
|
-
};
|
12
|
-
const LITERALS = [
|
13
|
-
"true",
|
14
|
-
"false",
|
15
|
-
"null"
|
16
|
-
];
|
17
|
-
const LITERALS_MODE = {
|
18
|
-
scope: "literal",
|
19
|
-
beginKeywords: LITERALS.join(" ")
|
20
|
-
};
|
21
|
-
return {
|
22
|
-
name: "JSON",
|
23
|
-
keywords: {
|
24
|
-
literal: LITERALS
|
25
|
-
},
|
26
|
-
contains: [
|
27
|
-
ATTRIBUTE,
|
28
|
-
PUNCTUATION,
|
29
|
-
hljs.QUOTE_STRING_MODE,
|
30
|
-
LITERALS_MODE,
|
31
|
-
hljs.C_NUMBER_MODE,
|
32
|
-
hljs.C_LINE_COMMENT_MODE,
|
33
|
-
hljs.C_BLOCK_COMMENT_MODE
|
34
|
-
],
|
35
|
-
illegal: "\\S"
|
36
|
-
};
|
37
|
-
}
|
38
|
-
export {
|
39
|
-
json as default
|
40
|
-
};
|
@@ -1,227 +0,0 @@
|
|
1
|
-
function markdown(hljs) {
|
2
|
-
const regex = hljs.regex;
|
3
|
-
const INLINE_HTML = {
|
4
|
-
begin: /<\/?[A-Za-z_]/,
|
5
|
-
end: ">",
|
6
|
-
subLanguage: "xml",
|
7
|
-
relevance: 0
|
8
|
-
};
|
9
|
-
const HORIZONTAL_RULE = {
|
10
|
-
begin: "^[-\\*]{3,}",
|
11
|
-
end: "$"
|
12
|
-
};
|
13
|
-
const CODE = {
|
14
|
-
className: "code",
|
15
|
-
variants: [
|
16
|
-
// TODO: fix to allow these to work with sublanguage also
|
17
|
-
{ begin: "(`{3,})[^`](.|\\n)*?\\1`*[ ]*" },
|
18
|
-
{ begin: "(~{3,})[^~](.|\\n)*?\\1~*[ ]*" },
|
19
|
-
// needed to allow markdown as a sublanguage to work
|
20
|
-
{
|
21
|
-
begin: "```",
|
22
|
-
end: "```+[ ]*$"
|
23
|
-
},
|
24
|
-
{
|
25
|
-
begin: "~~~",
|
26
|
-
end: "~~~+[ ]*$"
|
27
|
-
},
|
28
|
-
{ begin: "`.+?`" },
|
29
|
-
{
|
30
|
-
begin: "(?=^( {4}|\\t))",
|
31
|
-
// use contains to gobble up multiple lines to allow the block to be whatever size
|
32
|
-
// but only have a single open/close tag vs one per line
|
33
|
-
contains: [
|
34
|
-
{
|
35
|
-
begin: "^( {4}|\\t)",
|
36
|
-
end: "(\\n)$"
|
37
|
-
}
|
38
|
-
],
|
39
|
-
relevance: 0
|
40
|
-
}
|
41
|
-
]
|
42
|
-
};
|
43
|
-
const LIST = {
|
44
|
-
className: "bullet",
|
45
|
-
begin: "^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",
|
46
|
-
end: "\\s+",
|
47
|
-
excludeEnd: true
|
48
|
-
};
|
49
|
-
const LINK_REFERENCE = {
|
50
|
-
begin: /^\[[^\n]+\]:/,
|
51
|
-
returnBegin: true,
|
52
|
-
contains: [
|
53
|
-
{
|
54
|
-
className: "symbol",
|
55
|
-
begin: /\[/,
|
56
|
-
end: /\]/,
|
57
|
-
excludeBegin: true,
|
58
|
-
excludeEnd: true
|
59
|
-
},
|
60
|
-
{
|
61
|
-
className: "link",
|
62
|
-
begin: /:\s*/,
|
63
|
-
end: /$/,
|
64
|
-
excludeBegin: true
|
65
|
-
}
|
66
|
-
]
|
67
|
-
};
|
68
|
-
const URL_SCHEME = /[A-Za-z][A-Za-z0-9+.-]*/;
|
69
|
-
const LINK = {
|
70
|
-
variants: [
|
71
|
-
// too much like nested array access in so many languages
|
72
|
-
// to have any real relevance
|
73
|
-
{
|
74
|
-
begin: /\[.+?\]\[.*?\]/,
|
75
|
-
relevance: 0
|
76
|
-
},
|
77
|
-
// popular internet URLs
|
78
|
-
{
|
79
|
-
begin: /\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,
|
80
|
-
relevance: 2
|
81
|
-
},
|
82
|
-
{
|
83
|
-
begin: regex.concat(/\[.+?\]\(/, URL_SCHEME, /:\/\/.*?\)/),
|
84
|
-
relevance: 2
|
85
|
-
},
|
86
|
-
// relative urls
|
87
|
-
{
|
88
|
-
begin: /\[.+?\]\([./?&#].*?\)/,
|
89
|
-
relevance: 1
|
90
|
-
},
|
91
|
-
// whatever else, lower relevance (might not be a link at all)
|
92
|
-
{
|
93
|
-
begin: /\[.*?\]\(.*?\)/,
|
94
|
-
relevance: 0
|
95
|
-
}
|
96
|
-
],
|
97
|
-
returnBegin: true,
|
98
|
-
contains: [
|
99
|
-
{
|
100
|
-
// empty strings for alt or link text
|
101
|
-
match: /\[(?=\])/
|
102
|
-
},
|
103
|
-
{
|
104
|
-
className: "string",
|
105
|
-
relevance: 0,
|
106
|
-
begin: "\\[",
|
107
|
-
end: "\\]",
|
108
|
-
excludeBegin: true,
|
109
|
-
returnEnd: true
|
110
|
-
},
|
111
|
-
{
|
112
|
-
className: "link",
|
113
|
-
relevance: 0,
|
114
|
-
begin: "\\]\\(",
|
115
|
-
end: "\\)",
|
116
|
-
excludeBegin: true,
|
117
|
-
excludeEnd: true
|
118
|
-
},
|
119
|
-
{
|
120
|
-
className: "symbol",
|
121
|
-
relevance: 0,
|
122
|
-
begin: "\\]\\[",
|
123
|
-
end: "\\]",
|
124
|
-
excludeBegin: true,
|
125
|
-
excludeEnd: true
|
126
|
-
}
|
127
|
-
]
|
128
|
-
};
|
129
|
-
const BOLD = {
|
130
|
-
className: "strong",
|
131
|
-
contains: [],
|
132
|
-
// defined later
|
133
|
-
variants: [
|
134
|
-
{
|
135
|
-
begin: /_{2}(?!\s)/,
|
136
|
-
end: /_{2}/
|
137
|
-
},
|
138
|
-
{
|
139
|
-
begin: /\*{2}(?!\s)/,
|
140
|
-
end: /\*{2}/
|
141
|
-
}
|
142
|
-
]
|
143
|
-
};
|
144
|
-
const ITALIC = {
|
145
|
-
className: "emphasis",
|
146
|
-
contains: [],
|
147
|
-
// defined later
|
148
|
-
variants: [
|
149
|
-
{
|
150
|
-
begin: /\*(?![*\s])/,
|
151
|
-
end: /\*/
|
152
|
-
},
|
153
|
-
{
|
154
|
-
begin: /_(?![_\s])/,
|
155
|
-
end: /_/,
|
156
|
-
relevance: 0
|
157
|
-
}
|
158
|
-
]
|
159
|
-
};
|
160
|
-
const BOLD_WITHOUT_ITALIC = hljs.inherit(BOLD, { contains: [] });
|
161
|
-
const ITALIC_WITHOUT_BOLD = hljs.inherit(ITALIC, { contains: [] });
|
162
|
-
BOLD.contains.push(ITALIC_WITHOUT_BOLD);
|
163
|
-
ITALIC.contains.push(BOLD_WITHOUT_ITALIC);
|
164
|
-
let CONTAINABLE = [
|
165
|
-
INLINE_HTML,
|
166
|
-
LINK
|
167
|
-
];
|
168
|
-
[
|
169
|
-
BOLD,
|
170
|
-
ITALIC,
|
171
|
-
BOLD_WITHOUT_ITALIC,
|
172
|
-
ITALIC_WITHOUT_BOLD
|
173
|
-
].forEach((m) => {
|
174
|
-
m.contains = m.contains.concat(CONTAINABLE);
|
175
|
-
});
|
176
|
-
CONTAINABLE = CONTAINABLE.concat(BOLD, ITALIC);
|
177
|
-
const HEADER = {
|
178
|
-
className: "section",
|
179
|
-
variants: [
|
180
|
-
{
|
181
|
-
begin: "^#{1,6}",
|
182
|
-
end: "$",
|
183
|
-
contains: CONTAINABLE
|
184
|
-
},
|
185
|
-
{
|
186
|
-
begin: "(?=^.+?\\n[=-]{2,}$)",
|
187
|
-
contains: [
|
188
|
-
{ begin: "^[=-]*$" },
|
189
|
-
{
|
190
|
-
begin: "^",
|
191
|
-
end: "\\n",
|
192
|
-
contains: CONTAINABLE
|
193
|
-
}
|
194
|
-
]
|
195
|
-
}
|
196
|
-
]
|
197
|
-
};
|
198
|
-
const BLOCKQUOTE = {
|
199
|
-
className: "quote",
|
200
|
-
begin: "^>\\s+",
|
201
|
-
contains: CONTAINABLE,
|
202
|
-
end: "$"
|
203
|
-
};
|
204
|
-
return {
|
205
|
-
name: "Markdown",
|
206
|
-
aliases: [
|
207
|
-
"md",
|
208
|
-
"mkdown",
|
209
|
-
"mkd"
|
210
|
-
],
|
211
|
-
contains: [
|
212
|
-
HEADER,
|
213
|
-
INLINE_HTML,
|
214
|
-
LIST,
|
215
|
-
BOLD,
|
216
|
-
ITALIC,
|
217
|
-
BLOCKQUOTE,
|
218
|
-
CODE,
|
219
|
-
HORIZONTAL_RULE,
|
220
|
-
LINK,
|
221
|
-
LINK_REFERENCE
|
222
|
-
]
|
223
|
-
};
|
224
|
-
}
|
225
|
-
export {
|
226
|
-
markdown as default
|
227
|
-
};
|
@@ -1,144 +0,0 @@
|
|
1
|
-
function nginx(hljs) {
|
2
|
-
const regex = hljs.regex;
|
3
|
-
const VAR = {
|
4
|
-
className: "variable",
|
5
|
-
variants: [
|
6
|
-
{ begin: /\$\d+/ },
|
7
|
-
{ begin: /\$\{\w+\}/ },
|
8
|
-
{ begin: regex.concat(/[$@]/, hljs.UNDERSCORE_IDENT_RE) }
|
9
|
-
]
|
10
|
-
};
|
11
|
-
const LITERALS = [
|
12
|
-
"on",
|
13
|
-
"off",
|
14
|
-
"yes",
|
15
|
-
"no",
|
16
|
-
"true",
|
17
|
-
"false",
|
18
|
-
"none",
|
19
|
-
"blocked",
|
20
|
-
"debug",
|
21
|
-
"info",
|
22
|
-
"notice",
|
23
|
-
"warn",
|
24
|
-
"error",
|
25
|
-
"crit",
|
26
|
-
"select",
|
27
|
-
"break",
|
28
|
-
"last",
|
29
|
-
"permanent",
|
30
|
-
"redirect",
|
31
|
-
"kqueue",
|
32
|
-
"rtsig",
|
33
|
-
"epoll",
|
34
|
-
"poll",
|
35
|
-
"/dev/poll"
|
36
|
-
];
|
37
|
-
const DEFAULT = {
|
38
|
-
endsWithParent: true,
|
39
|
-
keywords: {
|
40
|
-
$pattern: /[a-z_]{2,}|\/dev\/poll/,
|
41
|
-
literal: LITERALS
|
42
|
-
},
|
43
|
-
relevance: 0,
|
44
|
-
illegal: "=>",
|
45
|
-
contains: [
|
46
|
-
hljs.HASH_COMMENT_MODE,
|
47
|
-
{
|
48
|
-
className: "string",
|
49
|
-
contains: [
|
50
|
-
hljs.BACKSLASH_ESCAPE,
|
51
|
-
VAR
|
52
|
-
],
|
53
|
-
variants: [
|
54
|
-
{
|
55
|
-
begin: /"/,
|
56
|
-
end: /"/
|
57
|
-
},
|
58
|
-
{
|
59
|
-
begin: /'/,
|
60
|
-
end: /'/
|
61
|
-
}
|
62
|
-
]
|
63
|
-
},
|
64
|
-
// this swallows entire URLs to avoid detecting numbers within
|
65
|
-
{
|
66
|
-
begin: "([a-z]+):/",
|
67
|
-
end: "\\s",
|
68
|
-
endsWithParent: true,
|
69
|
-
excludeEnd: true,
|
70
|
-
contains: [VAR]
|
71
|
-
},
|
72
|
-
{
|
73
|
-
className: "regexp",
|
74
|
-
contains: [
|
75
|
-
hljs.BACKSLASH_ESCAPE,
|
76
|
-
VAR
|
77
|
-
],
|
78
|
-
variants: [
|
79
|
-
{
|
80
|
-
begin: "\\s\\^",
|
81
|
-
end: "\\s|\\{|;",
|
82
|
-
returnEnd: true
|
83
|
-
},
|
84
|
-
// regexp locations (~, ~*)
|
85
|
-
{
|
86
|
-
begin: "~\\*?\\s+",
|
87
|
-
end: "\\s|\\{|;",
|
88
|
-
returnEnd: true
|
89
|
-
},
|
90
|
-
// *.example.com
|
91
|
-
{ begin: "\\*(\\.[a-z\\-]+)+" },
|
92
|
-
// sub.example.*
|
93
|
-
{ begin: "([a-z\\-]+\\.)+\\*" }
|
94
|
-
]
|
95
|
-
},
|
96
|
-
// IP
|
97
|
-
{
|
98
|
-
className: "number",
|
99
|
-
begin: "\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"
|
100
|
-
},
|
101
|
-
// units
|
102
|
-
{
|
103
|
-
className: "number",
|
104
|
-
begin: "\\b\\d+[kKmMgGdshdwy]?\\b",
|
105
|
-
relevance: 0
|
106
|
-
},
|
107
|
-
VAR
|
108
|
-
]
|
109
|
-
};
|
110
|
-
return {
|
111
|
-
name: "Nginx config",
|
112
|
-
aliases: ["nginxconf"],
|
113
|
-
contains: [
|
114
|
-
hljs.HASH_COMMENT_MODE,
|
115
|
-
{
|
116
|
-
beginKeywords: "upstream location",
|
117
|
-
end: /;|\{/,
|
118
|
-
contains: DEFAULT.contains,
|
119
|
-
keywords: { section: "upstream location" }
|
120
|
-
},
|
121
|
-
{
|
122
|
-
className: "section",
|
123
|
-
begin: regex.concat(hljs.UNDERSCORE_IDENT_RE + regex.lookahead(/\s+\{/)),
|
124
|
-
relevance: 0
|
125
|
-
},
|
126
|
-
{
|
127
|
-
begin: regex.lookahead(hljs.UNDERSCORE_IDENT_RE + "\\s"),
|
128
|
-
end: ";|\\{",
|
129
|
-
contains: [
|
130
|
-
{
|
131
|
-
className: "attribute",
|
132
|
-
begin: hljs.UNDERSCORE_IDENT_RE,
|
133
|
-
starts: DEFAULT
|
134
|
-
}
|
135
|
-
],
|
136
|
-
relevance: 0
|
137
|
-
}
|
138
|
-
],
|
139
|
-
illegal: "[^\\s\\}\\{]"
|
140
|
-
};
|
141
|
-
}
|
142
|
-
export {
|
143
|
-
nginx as default
|
144
|
-
};
|