@prokodo/ui 0.0.53 → 0.0.54
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/dist/_virtual/_commonjsHelpers.js +9 -0
- package/dist/_virtual/common.js +7 -0
- package/dist/components/post-item/PostItem.client.js +3 -4
- package/dist/components/post-item/PostItem.server.js +3 -4
- package/dist/components/post-item/PostItem.view.js +2 -2
- package/dist/components/post-teaser/PostTeaser.client.js +5 -6
- package/dist/components/post-teaser/PostTeaser.server.js +3 -4
- package/dist/components/post-teaser/PostTeaser.view.js +4 -4
- package/dist/components/rich-text/RichText.client.js +175 -10
- package/dist/components/rich-text/RichText.module.scss.js +1 -1
- package/dist/constants/project.js +1 -1
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/common.js +5 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/common.js +90 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/core.js +1629 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/bash.js +407 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/c.js +307 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/cpp.js +556 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/csharp.js +413 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/css.js +950 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/diff.js +66 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/go.js +167 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/graphql.js +83 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/ini.js +129 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/java.js +268 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/javascript.js +715 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/json.js +53 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/kotlin.js +268 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/less.js +1031 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/lua.js +74 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/makefile.js +84 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/markdown.js +245 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/objectivec.js +256 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/perl.js +498 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/php-template.js +59 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/php.js +614 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/plaintext.js +25 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/python-repl.js +38 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/python.js +428 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/r.js +223 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/ruby.js +426 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/rust.js +326 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/scss.js +935 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/shell.js +37 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/sql.js +658 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/swift.js +893 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/typescript.js +829 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/vbnet.js +146 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/wasm.js +134 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/xml.js +239 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/yaml.js +214 -0
- package/dist/node_modules/.pnpm/marked-highlight@2.2.2_marked@15.0.12/node_modules/marked-highlight/src/index.js +93 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/components/post-item/PostItem.model.d.ts +1 -1
- package/dist/types/components/post-teaser/PostTeaser.model.d.ts +1 -1
- package/dist/types/components/rich-text/RichText.client.d.ts +1 -1
- package/dist/types/components/rich-text/RichText.d.ts +5 -0
- package/dist/types/components/rich-text/RichText.lazy.d.ts +5 -0
- package/dist/types/components/rich-text/RichText.model.d.ts +5 -0
- package/dist/ui.css +38 -30
- package/package.json +3 -1
- package/dist/helpers/calculation.js +0 -6
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
var vbnet_1;
|
|
4
|
+
var hasRequiredVbnet;
|
|
5
|
+
function requireVbnet() {
|
|
6
|
+
if (hasRequiredVbnet) return vbnet_1;
|
|
7
|
+
hasRequiredVbnet = 1;
|
|
8
|
+
function vbnet(hljs) {
|
|
9
|
+
const regex = hljs.regex;
|
|
10
|
+
const CHARACTER = {
|
|
11
|
+
className: "string",
|
|
12
|
+
begin: /"(""|[^/n])"C\b/
|
|
13
|
+
};
|
|
14
|
+
const STRING = {
|
|
15
|
+
className: "string",
|
|
16
|
+
begin: /"/,
|
|
17
|
+
end: /"/,
|
|
18
|
+
illegal: /\n/,
|
|
19
|
+
contains: [
|
|
20
|
+
{
|
|
21
|
+
// double quote escape
|
|
22
|
+
begin: /""/
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
};
|
|
26
|
+
const MM_DD_YYYY = /\d{1,2}\/\d{1,2}\/\d{4}/;
|
|
27
|
+
const YYYY_MM_DD = /\d{4}-\d{1,2}-\d{1,2}/;
|
|
28
|
+
const TIME_12H = /(\d|1[012])(:\d+){0,2} *(AM|PM)/;
|
|
29
|
+
const TIME_24H = /\d{1,2}(:\d{1,2}){1,2}/;
|
|
30
|
+
const DATE = {
|
|
31
|
+
className: "literal",
|
|
32
|
+
variants: [
|
|
33
|
+
{
|
|
34
|
+
// #YYYY-MM-DD# (ISO-Date) or #M/D/YYYY# (US-Date)
|
|
35
|
+
begin: regex.concat(/# */, regex.either(YYYY_MM_DD, MM_DD_YYYY), / *#/)
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
// #H:mm[:ss]# (24h Time)
|
|
39
|
+
begin: regex.concat(/# */, TIME_24H, / *#/)
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
// #h[:mm[:ss]] A# (12h Time)
|
|
43
|
+
begin: regex.concat(/# */, TIME_12H, / *#/)
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
// date plus time
|
|
47
|
+
begin: regex.concat(
|
|
48
|
+
/# */,
|
|
49
|
+
regex.either(YYYY_MM_DD, MM_DD_YYYY),
|
|
50
|
+
/ +/,
|
|
51
|
+
regex.either(TIME_12H, TIME_24H),
|
|
52
|
+
/ *#/
|
|
53
|
+
)
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
};
|
|
57
|
+
const NUMBER = {
|
|
58
|
+
className: "number",
|
|
59
|
+
relevance: 0,
|
|
60
|
+
variants: [
|
|
61
|
+
{
|
|
62
|
+
// Float
|
|
63
|
+
begin: /\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
// Integer (base 10)
|
|
67
|
+
begin: /\b\d[\d_]*((U?[SIL])|[%&])?/
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
// Integer (base 16)
|
|
71
|
+
begin: /&H[\dA-F_]+((U?[SIL])|[%&])?/
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
// Integer (base 8)
|
|
75
|
+
begin: /&O[0-7_]+((U?[SIL])|[%&])?/
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
// Integer (base 2)
|
|
79
|
+
begin: /&B[01_]+((U?[SIL])|[%&])?/
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
};
|
|
83
|
+
const LABEL = {
|
|
84
|
+
className: "label",
|
|
85
|
+
begin: /^\w+:/
|
|
86
|
+
};
|
|
87
|
+
const DOC_COMMENT = hljs.COMMENT(/'''/, /$/, { contains: [
|
|
88
|
+
{
|
|
89
|
+
className: "doctag",
|
|
90
|
+
begin: /<\/?/,
|
|
91
|
+
end: />/
|
|
92
|
+
}
|
|
93
|
+
] });
|
|
94
|
+
const COMMENT = hljs.COMMENT(null, /$/, { variants: [
|
|
95
|
+
{ begin: /'/ },
|
|
96
|
+
{
|
|
97
|
+
// TODO: Use multi-class for leading spaces
|
|
98
|
+
begin: /([\t ]|^)REM(?=\s)/
|
|
99
|
+
}
|
|
100
|
+
] });
|
|
101
|
+
const DIRECTIVES = {
|
|
102
|
+
className: "meta",
|
|
103
|
+
// TODO: Use multi-class for indentation once available
|
|
104
|
+
begin: /[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,
|
|
105
|
+
end: /$/,
|
|
106
|
+
keywords: { keyword: "const disable else elseif enable end externalsource if region then" },
|
|
107
|
+
contains: [COMMENT]
|
|
108
|
+
};
|
|
109
|
+
return {
|
|
110
|
+
name: "Visual Basic .NET",
|
|
111
|
+
aliases: ["vb"],
|
|
112
|
+
case_insensitive: true,
|
|
113
|
+
classNameAliases: { label: "symbol" },
|
|
114
|
+
keywords: {
|
|
115
|
+
keyword: "addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",
|
|
116
|
+
built_in: (
|
|
117
|
+
// Operators https://docs.microsoft.com/dotnet/visual-basic/language-reference/operators
|
|
118
|
+
"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort"
|
|
119
|
+
),
|
|
120
|
+
type: (
|
|
121
|
+
// Data types https://docs.microsoft.com/dotnet/visual-basic/language-reference/data-types
|
|
122
|
+
"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort"
|
|
123
|
+
),
|
|
124
|
+
literal: "true false nothing"
|
|
125
|
+
},
|
|
126
|
+
illegal: "//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",
|
|
127
|
+
contains: [
|
|
128
|
+
CHARACTER,
|
|
129
|
+
STRING,
|
|
130
|
+
DATE,
|
|
131
|
+
NUMBER,
|
|
132
|
+
LABEL,
|
|
133
|
+
DOC_COMMENT,
|
|
134
|
+
COMMENT,
|
|
135
|
+
DIRECTIVES
|
|
136
|
+
]
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
__name(vbnet, "vbnet");
|
|
140
|
+
vbnet_1 = vbnet;
|
|
141
|
+
return vbnet_1;
|
|
142
|
+
}
|
|
143
|
+
__name(requireVbnet, "requireVbnet");
|
|
144
|
+
export {
|
|
145
|
+
requireVbnet as __require
|
|
146
|
+
};
|
package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/wasm.js
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
var wasm_1;
|
|
4
|
+
var hasRequiredWasm;
|
|
5
|
+
function requireWasm() {
|
|
6
|
+
if (hasRequiredWasm) return wasm_1;
|
|
7
|
+
hasRequiredWasm = 1;
|
|
8
|
+
function wasm(hljs) {
|
|
9
|
+
hljs.regex;
|
|
10
|
+
const BLOCK_COMMENT = hljs.COMMENT(/\(;/, /;\)/);
|
|
11
|
+
BLOCK_COMMENT.contains.push("self");
|
|
12
|
+
const LINE_COMMENT = hljs.COMMENT(/;;/, /$/);
|
|
13
|
+
const KWS = [
|
|
14
|
+
"anyfunc",
|
|
15
|
+
"block",
|
|
16
|
+
"br",
|
|
17
|
+
"br_if",
|
|
18
|
+
"br_table",
|
|
19
|
+
"call",
|
|
20
|
+
"call_indirect",
|
|
21
|
+
"data",
|
|
22
|
+
"drop",
|
|
23
|
+
"elem",
|
|
24
|
+
"else",
|
|
25
|
+
"end",
|
|
26
|
+
"export",
|
|
27
|
+
"func",
|
|
28
|
+
"global.get",
|
|
29
|
+
"global.set",
|
|
30
|
+
"local.get",
|
|
31
|
+
"local.set",
|
|
32
|
+
"local.tee",
|
|
33
|
+
"get_global",
|
|
34
|
+
"get_local",
|
|
35
|
+
"global",
|
|
36
|
+
"if",
|
|
37
|
+
"import",
|
|
38
|
+
"local",
|
|
39
|
+
"loop",
|
|
40
|
+
"memory",
|
|
41
|
+
"memory.grow",
|
|
42
|
+
"memory.size",
|
|
43
|
+
"module",
|
|
44
|
+
"mut",
|
|
45
|
+
"nop",
|
|
46
|
+
"offset",
|
|
47
|
+
"param",
|
|
48
|
+
"result",
|
|
49
|
+
"return",
|
|
50
|
+
"select",
|
|
51
|
+
"set_global",
|
|
52
|
+
"set_local",
|
|
53
|
+
"start",
|
|
54
|
+
"table",
|
|
55
|
+
"tee_local",
|
|
56
|
+
"then",
|
|
57
|
+
"type",
|
|
58
|
+
"unreachable"
|
|
59
|
+
];
|
|
60
|
+
const FUNCTION_REFERENCE = {
|
|
61
|
+
begin: [
|
|
62
|
+
/(?:func|call|call_indirect)/,
|
|
63
|
+
/\s+/,
|
|
64
|
+
/\$[^\s)]+/
|
|
65
|
+
],
|
|
66
|
+
className: {
|
|
67
|
+
1: "keyword",
|
|
68
|
+
3: "title.function"
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
const ARGUMENT = {
|
|
72
|
+
className: "variable",
|
|
73
|
+
begin: /\$[\w_]+/
|
|
74
|
+
};
|
|
75
|
+
const PARENS = {
|
|
76
|
+
match: /(\((?!;)|\))+/,
|
|
77
|
+
className: "punctuation",
|
|
78
|
+
relevance: 0
|
|
79
|
+
};
|
|
80
|
+
const NUMBER = {
|
|
81
|
+
className: "number",
|
|
82
|
+
relevance: 0,
|
|
83
|
+
// borrowed from Prism, TODO: split out into variants
|
|
84
|
+
match: /[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/
|
|
85
|
+
};
|
|
86
|
+
const TYPE = {
|
|
87
|
+
// look-ahead prevents us from gobbling up opcodes
|
|
88
|
+
match: /(i32|i64|f32|f64)(?!\.)/,
|
|
89
|
+
className: "type"
|
|
90
|
+
};
|
|
91
|
+
const MATH_OPERATIONS = {
|
|
92
|
+
className: "keyword",
|
|
93
|
+
// borrowed from Prism, TODO: split out into variants
|
|
94
|
+
match: /\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/
|
|
95
|
+
};
|
|
96
|
+
const OFFSET_ALIGN = {
|
|
97
|
+
match: [
|
|
98
|
+
/(?:offset|align)/,
|
|
99
|
+
/\s*/,
|
|
100
|
+
/=/
|
|
101
|
+
],
|
|
102
|
+
className: {
|
|
103
|
+
1: "keyword",
|
|
104
|
+
3: "operator"
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
return {
|
|
108
|
+
name: "WebAssembly",
|
|
109
|
+
keywords: {
|
|
110
|
+
$pattern: /[\w.]+/,
|
|
111
|
+
keyword: KWS
|
|
112
|
+
},
|
|
113
|
+
contains: [
|
|
114
|
+
LINE_COMMENT,
|
|
115
|
+
BLOCK_COMMENT,
|
|
116
|
+
OFFSET_ALIGN,
|
|
117
|
+
ARGUMENT,
|
|
118
|
+
PARENS,
|
|
119
|
+
FUNCTION_REFERENCE,
|
|
120
|
+
hljs.QUOTE_STRING_MODE,
|
|
121
|
+
TYPE,
|
|
122
|
+
MATH_OPERATIONS,
|
|
123
|
+
NUMBER
|
|
124
|
+
]
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
__name(wasm, "wasm");
|
|
128
|
+
wasm_1 = wasm;
|
|
129
|
+
return wasm_1;
|
|
130
|
+
}
|
|
131
|
+
__name(requireWasm, "requireWasm");
|
|
132
|
+
export {
|
|
133
|
+
requireWasm as __require
|
|
134
|
+
};
|
package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/xml.js
ADDED
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
var xml_1;
|
|
4
|
+
var hasRequiredXml;
|
|
5
|
+
function requireXml() {
|
|
6
|
+
if (hasRequiredXml) return xml_1;
|
|
7
|
+
hasRequiredXml = 1;
|
|
8
|
+
function xml(hljs) {
|
|
9
|
+
const regex = hljs.regex;
|
|
10
|
+
const TAG_NAME_RE = regex.concat(/[\p{L}_]/u, regex.optional(/[\p{L}0-9_.-]*:/u), /[\p{L}0-9_.-]*/u);
|
|
11
|
+
const XML_IDENT_RE = /[\p{L}0-9._:-]+/u;
|
|
12
|
+
const XML_ENTITIES = {
|
|
13
|
+
className: "symbol",
|
|
14
|
+
begin: /&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/
|
|
15
|
+
};
|
|
16
|
+
const XML_META_KEYWORDS = {
|
|
17
|
+
begin: /\s/,
|
|
18
|
+
contains: [
|
|
19
|
+
{
|
|
20
|
+
className: "keyword",
|
|
21
|
+
begin: /#?[a-z_][a-z1-9_-]+/,
|
|
22
|
+
illegal: /\n/
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
};
|
|
26
|
+
const XML_META_PAR_KEYWORDS = hljs.inherit(XML_META_KEYWORDS, {
|
|
27
|
+
begin: /\(/,
|
|
28
|
+
end: /\)/
|
|
29
|
+
});
|
|
30
|
+
const APOS_META_STRING_MODE = hljs.inherit(hljs.APOS_STRING_MODE, { className: "string" });
|
|
31
|
+
const QUOTE_META_STRING_MODE = hljs.inherit(hljs.QUOTE_STRING_MODE, { className: "string" });
|
|
32
|
+
const TAG_INTERNALS = {
|
|
33
|
+
endsWithParent: true,
|
|
34
|
+
illegal: /</,
|
|
35
|
+
relevance: 0,
|
|
36
|
+
contains: [
|
|
37
|
+
{
|
|
38
|
+
className: "attr",
|
|
39
|
+
begin: XML_IDENT_RE,
|
|
40
|
+
relevance: 0
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
begin: /=\s*/,
|
|
44
|
+
relevance: 0,
|
|
45
|
+
contains: [
|
|
46
|
+
{
|
|
47
|
+
className: "string",
|
|
48
|
+
endsParent: true,
|
|
49
|
+
variants: [
|
|
50
|
+
{
|
|
51
|
+
begin: /"/,
|
|
52
|
+
end: /"/,
|
|
53
|
+
contains: [XML_ENTITIES]
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
begin: /'/,
|
|
57
|
+
end: /'/,
|
|
58
|
+
contains: [XML_ENTITIES]
|
|
59
|
+
},
|
|
60
|
+
{ begin: /[^\s"'=<>`]+/ }
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
};
|
|
67
|
+
return {
|
|
68
|
+
name: "HTML, XML",
|
|
69
|
+
aliases: [
|
|
70
|
+
"html",
|
|
71
|
+
"xhtml",
|
|
72
|
+
"rss",
|
|
73
|
+
"atom",
|
|
74
|
+
"xjb",
|
|
75
|
+
"xsd",
|
|
76
|
+
"xsl",
|
|
77
|
+
"plist",
|
|
78
|
+
"wsf",
|
|
79
|
+
"svg"
|
|
80
|
+
],
|
|
81
|
+
case_insensitive: true,
|
|
82
|
+
unicodeRegex: true,
|
|
83
|
+
contains: [
|
|
84
|
+
{
|
|
85
|
+
className: "meta",
|
|
86
|
+
begin: /<![a-z]/,
|
|
87
|
+
end: />/,
|
|
88
|
+
relevance: 10,
|
|
89
|
+
contains: [
|
|
90
|
+
XML_META_KEYWORDS,
|
|
91
|
+
QUOTE_META_STRING_MODE,
|
|
92
|
+
APOS_META_STRING_MODE,
|
|
93
|
+
XML_META_PAR_KEYWORDS,
|
|
94
|
+
{
|
|
95
|
+
begin: /\[/,
|
|
96
|
+
end: /\]/,
|
|
97
|
+
contains: [
|
|
98
|
+
{
|
|
99
|
+
className: "meta",
|
|
100
|
+
begin: /<![a-z]/,
|
|
101
|
+
end: />/,
|
|
102
|
+
contains: [
|
|
103
|
+
XML_META_KEYWORDS,
|
|
104
|
+
XML_META_PAR_KEYWORDS,
|
|
105
|
+
QUOTE_META_STRING_MODE,
|
|
106
|
+
APOS_META_STRING_MODE
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
hljs.COMMENT(
|
|
114
|
+
/<!--/,
|
|
115
|
+
/-->/,
|
|
116
|
+
{ relevance: 10 }
|
|
117
|
+
),
|
|
118
|
+
{
|
|
119
|
+
begin: /<!\[CDATA\[/,
|
|
120
|
+
end: /\]\]>/,
|
|
121
|
+
relevance: 10
|
|
122
|
+
},
|
|
123
|
+
XML_ENTITIES,
|
|
124
|
+
// xml processing instructions
|
|
125
|
+
{
|
|
126
|
+
className: "meta",
|
|
127
|
+
end: /\?>/,
|
|
128
|
+
variants: [
|
|
129
|
+
{
|
|
130
|
+
begin: /<\?xml/,
|
|
131
|
+
relevance: 10,
|
|
132
|
+
contains: [
|
|
133
|
+
QUOTE_META_STRING_MODE
|
|
134
|
+
]
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
begin: /<\?[a-z][a-z0-9]+/
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
className: "tag",
|
|
143
|
+
/*
|
|
144
|
+
The lookahead pattern (?=...) ensures that 'begin' only matches
|
|
145
|
+
'<style' as a single word, followed by a whitespace or an
|
|
146
|
+
ending bracket.
|
|
147
|
+
*/
|
|
148
|
+
begin: /<style(?=\s|>)/,
|
|
149
|
+
end: />/,
|
|
150
|
+
keywords: { name: "style" },
|
|
151
|
+
contains: [TAG_INTERNALS],
|
|
152
|
+
starts: {
|
|
153
|
+
end: /<\/style>/,
|
|
154
|
+
returnEnd: true,
|
|
155
|
+
subLanguage: [
|
|
156
|
+
"css",
|
|
157
|
+
"xml"
|
|
158
|
+
]
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
className: "tag",
|
|
163
|
+
// See the comment in the <style tag about the lookahead pattern
|
|
164
|
+
begin: /<script(?=\s|>)/,
|
|
165
|
+
end: />/,
|
|
166
|
+
keywords: { name: "script" },
|
|
167
|
+
contains: [TAG_INTERNALS],
|
|
168
|
+
starts: {
|
|
169
|
+
end: /<\/script>/,
|
|
170
|
+
returnEnd: true,
|
|
171
|
+
subLanguage: [
|
|
172
|
+
"javascript",
|
|
173
|
+
"handlebars",
|
|
174
|
+
"xml"
|
|
175
|
+
]
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
// we need this for now for jSX
|
|
179
|
+
{
|
|
180
|
+
className: "tag",
|
|
181
|
+
begin: /<>|<\/>/
|
|
182
|
+
},
|
|
183
|
+
// open tag
|
|
184
|
+
{
|
|
185
|
+
className: "tag",
|
|
186
|
+
begin: regex.concat(
|
|
187
|
+
/</,
|
|
188
|
+
regex.lookahead(regex.concat(
|
|
189
|
+
TAG_NAME_RE,
|
|
190
|
+
// <tag/>
|
|
191
|
+
// <tag>
|
|
192
|
+
// <tag ...
|
|
193
|
+
regex.either(/\/>/, />/, /\s/)
|
|
194
|
+
))
|
|
195
|
+
),
|
|
196
|
+
end: /\/?>/,
|
|
197
|
+
contains: [
|
|
198
|
+
{
|
|
199
|
+
className: "name",
|
|
200
|
+
begin: TAG_NAME_RE,
|
|
201
|
+
relevance: 0,
|
|
202
|
+
starts: TAG_INTERNALS
|
|
203
|
+
}
|
|
204
|
+
]
|
|
205
|
+
},
|
|
206
|
+
// close tag
|
|
207
|
+
{
|
|
208
|
+
className: "tag",
|
|
209
|
+
begin: regex.concat(
|
|
210
|
+
/<\//,
|
|
211
|
+
regex.lookahead(regex.concat(
|
|
212
|
+
TAG_NAME_RE,
|
|
213
|
+
/>/
|
|
214
|
+
))
|
|
215
|
+
),
|
|
216
|
+
contains: [
|
|
217
|
+
{
|
|
218
|
+
className: "name",
|
|
219
|
+
begin: TAG_NAME_RE,
|
|
220
|
+
relevance: 0
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
begin: />/,
|
|
224
|
+
relevance: 0,
|
|
225
|
+
endsParent: true
|
|
226
|
+
}
|
|
227
|
+
]
|
|
228
|
+
}
|
|
229
|
+
]
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
__name(xml, "xml");
|
|
233
|
+
xml_1 = xml;
|
|
234
|
+
return xml_1;
|
|
235
|
+
}
|
|
236
|
+
__name(requireXml, "requireXml");
|
|
237
|
+
export {
|
|
238
|
+
requireXml as __require
|
|
239
|
+
};
|