react-ai-renderer 0.1.6 → 0.1.7
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/index.cjs +500 -485
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +500 -485
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -5775,126 +5775,134 @@ function c(Prism) {
|
|
|
5775
5775
|
delete Prism.languages.c['boolean'];
|
|
5776
5776
|
}
|
|
5777
5777
|
|
|
5778
|
-
var
|
|
5779
|
-
var
|
|
5780
|
-
|
|
5781
|
-
|
|
5782
|
-
|
|
5783
|
-
|
|
5784
|
-
|
|
5785
|
-
|
|
5786
|
-
|
|
5787
|
-
|
|
5788
|
-
|
|
5789
|
-
|
|
5790
|
-
|
|
5791
|
-
|
|
5792
|
-
|
|
5793
|
-
|
|
5794
|
-
|
|
5795
|
-
|
|
5796
|
-
|
|
5797
|
-
|
|
5798
|
-
|
|
5799
|
-
|
|
5800
|
-
|
|
5801
|
-
|
|
5802
|
-
|
|
5803
|
-
|
|
5804
|
-
|
|
5805
|
-
|
|
5806
|
-
|
|
5807
|
-
|
|
5808
|
-
|
|
5809
|
-
|
|
5810
|
-
|
|
5811
|
-
|
|
5812
|
-
|
|
5813
|
-
|
|
5814
|
-
|
|
5815
|
-
|
|
5816
|
-
|
|
5817
|
-
|
|
5818
|
-
|
|
5819
|
-
|
|
5820
|
-
|
|
5821
|
-
|
|
5822
|
-
|
|
5823
|
-
|
|
5824
|
-
|
|
5825
|
-
|
|
5826
|
-
|
|
5827
|
-
|
|
5828
|
-
|
|
5829
|
-
|
|
5830
|
-
|
|
5831
|
-
|
|
5832
|
-
|
|
5833
|
-
|
|
5834
|
-
|
|
5835
|
-
|
|
5836
|
-
|
|
5837
|
-
|
|
5838
|
-
|
|
5839
|
-
|
|
5840
|
-
|
|
5841
|
-
|
|
5842
|
-
|
|
5843
|
-
|
|
5844
|
-
|
|
5845
|
-
|
|
5846
|
-
|
|
5847
|
-
|
|
5848
|
-
|
|
5849
|
-
|
|
5850
|
-
|
|
5851
|
-
|
|
5852
|
-
|
|
5853
|
-
|
|
5854
|
-
|
|
5855
|
-
|
|
5856
|
-
|
|
5857
|
-
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
|
|
5861
|
-
|
|
5862
|
-
|
|
5863
|
-
|
|
5864
|
-
|
|
5865
|
-
|
|
5866
|
-
|
|
5867
|
-
|
|
5868
|
-
|
|
5869
|
-
|
|
5870
|
-
|
|
5871
|
-
|
|
5872
|
-
|
|
5873
|
-
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
|
|
5877
|
-
|
|
5878
|
-
|
|
5879
|
-
|
|
5880
|
-
|
|
5881
|
-
|
|
5882
|
-
|
|
5883
|
-
|
|
5884
|
-
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
|
|
5888
|
-
|
|
5889
|
-
|
|
5890
|
-
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
|
|
5894
|
-
|
|
5778
|
+
var cpp_1;
|
|
5779
|
+
var hasRequiredCpp;
|
|
5780
|
+
|
|
5781
|
+
function requireCpp () {
|
|
5782
|
+
if (hasRequiredCpp) return cpp_1;
|
|
5783
|
+
hasRequiredCpp = 1;
|
|
5784
|
+
var refractorC = c_1;
|
|
5785
|
+
cpp_1 = cpp;
|
|
5786
|
+
cpp.displayName = 'cpp';
|
|
5787
|
+
cpp.aliases = [];
|
|
5788
|
+
function cpp(Prism) {
|
|
5789
|
+
Prism.register(refractorC)
|
|
5790
|
+
;(function (Prism) {
|
|
5791
|
+
var keyword =
|
|
5792
|
+
/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/;
|
|
5793
|
+
var modName = /\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(
|
|
5794
|
+
/<keyword>/g,
|
|
5795
|
+
function () {
|
|
5796
|
+
return keyword.source
|
|
5797
|
+
}
|
|
5798
|
+
);
|
|
5799
|
+
Prism.languages.cpp = Prism.languages.extend('c', {
|
|
5800
|
+
'class-name': [
|
|
5801
|
+
{
|
|
5802
|
+
pattern: RegExp(
|
|
5803
|
+
/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(
|
|
5804
|
+
/<keyword>/g,
|
|
5805
|
+
function () {
|
|
5806
|
+
return keyword.source
|
|
5807
|
+
}
|
|
5808
|
+
)
|
|
5809
|
+
),
|
|
5810
|
+
lookbehind: true
|
|
5811
|
+
}, // This is intended to capture the class name of method implementations like:
|
|
5812
|
+
// void foo::bar() const {}
|
|
5813
|
+
// However! The `foo` in the above example could also be a namespace, so we only capture the class name if
|
|
5814
|
+
// it starts with an uppercase letter. This approximation should give decent results.
|
|
5815
|
+
/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/, // This will capture the class name before destructors like:
|
|
5816
|
+
// Foo::~Foo() {}
|
|
5817
|
+
/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i, // This also intends to capture the class name of method implementations but here the class has template
|
|
5818
|
+
// parameters, so it can't be a namespace (until C++ adds generic namespaces).
|
|
5819
|
+
/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/
|
|
5820
|
+
],
|
|
5821
|
+
keyword: keyword,
|
|
5822
|
+
number: {
|
|
5823
|
+
pattern:
|
|
5824
|
+
/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,
|
|
5825
|
+
greedy: true
|
|
5826
|
+
},
|
|
5827
|
+
operator:
|
|
5828
|
+
/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,
|
|
5829
|
+
boolean: /\b(?:false|true)\b/
|
|
5830
|
+
});
|
|
5831
|
+
Prism.languages.insertBefore('cpp', 'string', {
|
|
5832
|
+
module: {
|
|
5833
|
+
// https://en.cppreference.com/w/cpp/language/modules
|
|
5834
|
+
pattern: RegExp(
|
|
5835
|
+
/(\b(?:import|module)\s+)/.source +
|
|
5836
|
+
'(?:' + // header-name
|
|
5837
|
+
/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source +
|
|
5838
|
+
'|' + // module name or partition or both
|
|
5839
|
+
/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(
|
|
5840
|
+
/<mod-name>/g,
|
|
5841
|
+
function () {
|
|
5842
|
+
return modName
|
|
5843
|
+
}
|
|
5844
|
+
) +
|
|
5845
|
+
')'
|
|
5846
|
+
),
|
|
5847
|
+
lookbehind: true,
|
|
5848
|
+
greedy: true,
|
|
5849
|
+
inside: {
|
|
5850
|
+
string: /^[<"][\s\S]+/,
|
|
5851
|
+
operator: /:/,
|
|
5852
|
+
punctuation: /\./
|
|
5853
|
+
}
|
|
5854
|
+
},
|
|
5855
|
+
'raw-string': {
|
|
5856
|
+
pattern: /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,
|
|
5857
|
+
alias: 'string',
|
|
5858
|
+
greedy: true
|
|
5859
|
+
}
|
|
5860
|
+
});
|
|
5861
|
+
Prism.languages.insertBefore('cpp', 'keyword', {
|
|
5862
|
+
'generic-function': {
|
|
5863
|
+
pattern: /\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,
|
|
5864
|
+
inside: {
|
|
5865
|
+
function: /^\w+/,
|
|
5866
|
+
generic: {
|
|
5867
|
+
pattern: /<[\s\S]+/,
|
|
5868
|
+
alias: 'class-name',
|
|
5869
|
+
inside: Prism.languages.cpp
|
|
5870
|
+
}
|
|
5871
|
+
}
|
|
5872
|
+
}
|
|
5873
|
+
});
|
|
5874
|
+
Prism.languages.insertBefore('cpp', 'operator', {
|
|
5875
|
+
'double-colon': {
|
|
5876
|
+
pattern: /::/,
|
|
5877
|
+
alias: 'punctuation'
|
|
5878
|
+
}
|
|
5879
|
+
});
|
|
5880
|
+
Prism.languages.insertBefore('cpp', 'class-name', {
|
|
5881
|
+
// the base clause is an optional list of parent classes
|
|
5882
|
+
// https://en.cppreference.com/w/cpp/language/class
|
|
5883
|
+
'base-clause': {
|
|
5884
|
+
pattern:
|
|
5885
|
+
/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,
|
|
5886
|
+
lookbehind: true,
|
|
5887
|
+
greedy: true,
|
|
5888
|
+
inside: Prism.languages.extend('cpp', {})
|
|
5889
|
+
}
|
|
5890
|
+
});
|
|
5891
|
+
Prism.languages.insertBefore(
|
|
5892
|
+
'inside',
|
|
5893
|
+
'double-colon',
|
|
5894
|
+
{
|
|
5895
|
+
// All untokenized words that are not namespaces should be class names
|
|
5896
|
+
'class-name': /\b[a-z_]\w*\b(?!\s*::)/i
|
|
5897
|
+
},
|
|
5898
|
+
Prism.languages.cpp['base-clause']
|
|
5899
|
+
);
|
|
5900
|
+
})(Prism);
|
|
5901
|
+
}
|
|
5902
|
+
return cpp_1;
|
|
5895
5903
|
}
|
|
5896
5904
|
|
|
5897
|
-
var refractorCpp$1 =
|
|
5905
|
+
var refractorCpp$1 = requireCpp();
|
|
5898
5906
|
var arduino_1 = arduino;
|
|
5899
5907
|
arduino.displayName = 'arduino';
|
|
5900
5908
|
arduino.aliases = ['ino'];
|
|
@@ -7895,7 +7903,7 @@ function cfscript(Prism) {
|
|
|
7895
7903
|
Prism.languages.cfc = Prism.languages['cfscript'];
|
|
7896
7904
|
}
|
|
7897
7905
|
|
|
7898
|
-
var refractorCpp =
|
|
7906
|
+
var refractorCpp = requireCpp();
|
|
7899
7907
|
var chaiscript_1 = chaiscript;
|
|
7900
7908
|
chaiscript.displayName = 'chaiscript';
|
|
7901
7909
|
chaiscript.aliases = [];
|
|
@@ -9015,64 +9023,64 @@ function cssExtras(Prism) {
|
|
|
9015
9023
|
})(Prism);
|
|
9016
9024
|
}
|
|
9017
9025
|
|
|
9018
|
-
var csv_1
|
|
9019
|
-
|
|
9020
|
-
csv.aliases = [];
|
|
9021
|
-
function csv(Prism) {
|
|
9022
|
-
// https://tools.ietf.org/html/rfc4180
|
|
9023
|
-
Prism.languages.csv = {
|
|
9024
|
-
value: /[^\r\n,"]+|"(?:[^"]|"")*"(?!")/,
|
|
9025
|
-
punctuation: /,/
|
|
9026
|
-
};
|
|
9027
|
-
}
|
|
9026
|
+
var csv_1;
|
|
9027
|
+
var hasRequiredCsv;
|
|
9028
9028
|
|
|
9029
|
-
|
|
9030
|
-
|
|
9029
|
+
function requireCsv () {
|
|
9030
|
+
if (hasRequiredCsv) return csv_1;
|
|
9031
|
+
hasRequiredCsv = 1;
|
|
9031
9032
|
|
|
9032
|
-
|
|
9033
|
-
|
|
9034
|
-
|
|
9035
|
-
|
|
9036
|
-
|
|
9037
|
-
|
|
9038
|
-
|
|
9039
|
-
|
|
9040
|
-
Prism.languages.cypher = {
|
|
9041
|
-
// https://neo4j.com/docs/cypher-manual/current/syntax/comments/
|
|
9042
|
-
comment: /\/\/.*/,
|
|
9043
|
-
string: {
|
|
9044
|
-
pattern: /"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/,
|
|
9045
|
-
greedy: true
|
|
9046
|
-
},
|
|
9047
|
-
'class-name': {
|
|
9048
|
-
pattern: /(:\s*)(?:\w+|`(?:[^`\\\r\n])*`)(?=\s*[{):])/,
|
|
9049
|
-
lookbehind: true,
|
|
9050
|
-
greedy: true
|
|
9051
|
-
},
|
|
9052
|
-
relationship: {
|
|
9053
|
-
pattern:
|
|
9054
|
-
/(-\[\s*(?:\w+\s*|`(?:[^`\\\r\n])*`\s*)?:\s*|\|\s*:\s*)(?:\w+|`(?:[^`\\\r\n])*`)/,
|
|
9055
|
-
lookbehind: true,
|
|
9056
|
-
greedy: true,
|
|
9057
|
-
alias: 'property'
|
|
9058
|
-
},
|
|
9059
|
-
identifier: {
|
|
9060
|
-
pattern: /`(?:[^`\\\r\n])*`/,
|
|
9061
|
-
greedy: true
|
|
9062
|
-
},
|
|
9063
|
-
variable: /\$\w+/,
|
|
9064
|
-
// https://neo4j.com/docs/cypher-manual/current/syntax/reserved/
|
|
9065
|
-
keyword:
|
|
9066
|
-
/\b(?:ADD|ALL|AND|AS|ASC|ASCENDING|ASSERT|BY|CALL|CASE|COMMIT|CONSTRAINT|CONTAINS|CREATE|CSV|DELETE|DESC|DESCENDING|DETACH|DISTINCT|DO|DROP|ELSE|END|ENDS|EXISTS|FOR|FOREACH|IN|INDEX|IS|JOIN|KEY|LIMIT|LOAD|MANDATORY|MATCH|MERGE|NODE|NOT|OF|ON|OPTIONAL|OR|ORDER(?=\s+BY)|PERIODIC|REMOVE|REQUIRE|RETURN|SCALAR|SCAN|SET|SKIP|START|STARTS|THEN|UNION|UNIQUE|UNWIND|USING|WHEN|WHERE|WITH|XOR|YIELD)\b/i,
|
|
9067
|
-
function: /\b\w+\b(?=\s*\()/,
|
|
9068
|
-
boolean: /\b(?:false|null|true)\b/i,
|
|
9069
|
-
number: /\b(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)\b/,
|
|
9070
|
-
// https://neo4j.com/docs/cypher-manual/current/syntax/operators/
|
|
9071
|
-
operator: /:|<--?|--?>?|<>|=~?|[<>]=?|[+*/%^|]|\.\.\.?/,
|
|
9072
|
-
punctuation: /[()[\]{},;.]/
|
|
9033
|
+
csv_1 = csv;
|
|
9034
|
+
csv.displayName = 'csv';
|
|
9035
|
+
csv.aliases = [];
|
|
9036
|
+
function csv(Prism) {
|
|
9037
|
+
// https://tools.ietf.org/html/rfc4180
|
|
9038
|
+
Prism.languages.csv = {
|
|
9039
|
+
value: /[^\r\n,"]+|"(?:[^"]|"")*"(?!")/,
|
|
9040
|
+
punctuation: /,/
|
|
9073
9041
|
};
|
|
9074
9042
|
}
|
|
9075
|
-
return
|
|
9043
|
+
return csv_1;
|
|
9044
|
+
}
|
|
9045
|
+
|
|
9046
|
+
var cypher_1 = cypher;
|
|
9047
|
+
cypher.displayName = 'cypher';
|
|
9048
|
+
cypher.aliases = [];
|
|
9049
|
+
function cypher(Prism) {
|
|
9050
|
+
Prism.languages.cypher = {
|
|
9051
|
+
// https://neo4j.com/docs/cypher-manual/current/syntax/comments/
|
|
9052
|
+
comment: /\/\/.*/,
|
|
9053
|
+
string: {
|
|
9054
|
+
pattern: /"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/,
|
|
9055
|
+
greedy: true
|
|
9056
|
+
},
|
|
9057
|
+
'class-name': {
|
|
9058
|
+
pattern: /(:\s*)(?:\w+|`(?:[^`\\\r\n])*`)(?=\s*[{):])/,
|
|
9059
|
+
lookbehind: true,
|
|
9060
|
+
greedy: true
|
|
9061
|
+
},
|
|
9062
|
+
relationship: {
|
|
9063
|
+
pattern:
|
|
9064
|
+
/(-\[\s*(?:\w+\s*|`(?:[^`\\\r\n])*`\s*)?:\s*|\|\s*:\s*)(?:\w+|`(?:[^`\\\r\n])*`)/,
|
|
9065
|
+
lookbehind: true,
|
|
9066
|
+
greedy: true,
|
|
9067
|
+
alias: 'property'
|
|
9068
|
+
},
|
|
9069
|
+
identifier: {
|
|
9070
|
+
pattern: /`(?:[^`\\\r\n])*`/,
|
|
9071
|
+
greedy: true
|
|
9072
|
+
},
|
|
9073
|
+
variable: /\$\w+/,
|
|
9074
|
+
// https://neo4j.com/docs/cypher-manual/current/syntax/reserved/
|
|
9075
|
+
keyword:
|
|
9076
|
+
/\b(?:ADD|ALL|AND|AS|ASC|ASCENDING|ASSERT|BY|CALL|CASE|COMMIT|CONSTRAINT|CONTAINS|CREATE|CSV|DELETE|DESC|DESCENDING|DETACH|DISTINCT|DO|DROP|ELSE|END|ENDS|EXISTS|FOR|FOREACH|IN|INDEX|IS|JOIN|KEY|LIMIT|LOAD|MANDATORY|MATCH|MERGE|NODE|NOT|OF|ON|OPTIONAL|OR|ORDER(?=\s+BY)|PERIODIC|REMOVE|REQUIRE|RETURN|SCALAR|SCAN|SET|SKIP|START|STARTS|THEN|UNION|UNIQUE|UNWIND|USING|WHEN|WHERE|WITH|XOR|YIELD)\b/i,
|
|
9077
|
+
function: /\b\w+\b(?=\s*\()/,
|
|
9078
|
+
boolean: /\b(?:false|null|true)\b/i,
|
|
9079
|
+
number: /\b(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)\b/,
|
|
9080
|
+
// https://neo4j.com/docs/cypher-manual/current/syntax/operators/
|
|
9081
|
+
operator: /:|<--?|--?>?|<>|=~?|[<>]=?|[+*/%^|]|\.\.\.?/,
|
|
9082
|
+
punctuation: /[()[\]{},;.]/
|
|
9083
|
+
};
|
|
9076
9084
|
}
|
|
9077
9085
|
|
|
9078
9086
|
var d_1 = d;
|
|
@@ -9161,97 +9169,88 @@ function d(Prism) {
|
|
|
9161
9169
|
});
|
|
9162
9170
|
}
|
|
9163
9171
|
|
|
9164
|
-
var dart_1;
|
|
9165
|
-
|
|
9166
|
-
|
|
9167
|
-
function
|
|
9168
|
-
if (hasRequiredDart) return dart_1;
|
|
9169
|
-
hasRequiredDart = 1;
|
|
9170
|
-
|
|
9171
|
-
dart_1 = dart;
|
|
9172
|
-
dart.displayName = 'dart';
|
|
9173
|
-
dart.aliases = [];
|
|
9174
|
-
function dart(Prism) {
|
|
9172
|
+
var dart_1 = dart;
|
|
9173
|
+
dart.displayName = 'dart';
|
|
9174
|
+
dart.aliases = [];
|
|
9175
|
+
function dart(Prism) {
|
|
9175
9176
|
(function (Prism) {
|
|
9176
|
-
|
|
9177
|
-
|
|
9178
|
-
|
|
9179
|
-
|
|
9180
|
-
|
|
9181
|
-
|
|
9182
|
-
|
|
9183
|
-
|
|
9184
|
-
|
|
9185
|
-
|
|
9186
|
-
|
|
9187
|
-
|
|
9188
|
-
|
|
9189
|
-
|
|
9190
|
-
|
|
9191
|
-
|
|
9192
|
-
|
|
9193
|
-
|
|
9194
|
-
|
|
9195
|
-
|
|
9196
|
-
|
|
9197
|
-
|
|
9198
|
-
|
|
9199
|
-
|
|
9200
|
-
|
|
9201
|
-
|
|
9202
|
-
|
|
9203
|
-
|
|
9204
|
-
|
|
9205
|
-
|
|
9206
|
-
|
|
9207
|
-
|
|
9208
|
-
|
|
9209
|
-
|
|
9210
|
-
|
|
9211
|
-
|
|
9212
|
-
|
|
9213
|
-
|
|
9214
|
-
|
|
9215
|
-
|
|
9216
|
-
|
|
9217
|
-
|
|
9218
|
-
|
|
9219
|
-
|
|
9220
|
-
|
|
9221
|
-
|
|
9222
|
-
|
|
9223
|
-
|
|
9224
|
-
|
|
9225
|
-
|
|
9226
|
-
|
|
9227
|
-
|
|
9228
|
-
|
|
9229
|
-
|
|
9230
|
-
|
|
9231
|
-
|
|
9232
|
-
|
|
9233
|
-
|
|
9234
|
-
|
|
9235
|
-
|
|
9236
|
-
|
|
9237
|
-
|
|
9238
|
-
|
|
9239
|
-
|
|
9240
|
-
|
|
9241
|
-
|
|
9242
|
-
|
|
9243
|
-
|
|
9244
|
-
|
|
9245
|
-
|
|
9246
|
-
|
|
9247
|
-
|
|
9248
|
-
|
|
9249
|
-
|
|
9250
|
-
|
|
9251
|
-
|
|
9252
|
-
|
|
9253
|
-
}
|
|
9254
|
-
return dart_1;
|
|
9177
|
+
var keywords = [
|
|
9178
|
+
/\b(?:async|sync|yield)\*/,
|
|
9179
|
+
/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/
|
|
9180
|
+
]; // Handles named imports, such as http.Client
|
|
9181
|
+
var packagePrefix = /(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/
|
|
9182
|
+
.source; // based on the dart naming conventions
|
|
9183
|
+
var className = {
|
|
9184
|
+
pattern: RegExp(packagePrefix + /[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),
|
|
9185
|
+
lookbehind: true,
|
|
9186
|
+
inside: {
|
|
9187
|
+
namespace: {
|
|
9188
|
+
pattern: /^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,
|
|
9189
|
+
inside: {
|
|
9190
|
+
punctuation: /\./
|
|
9191
|
+
}
|
|
9192
|
+
}
|
|
9193
|
+
}
|
|
9194
|
+
};
|
|
9195
|
+
Prism.languages.dart = Prism.languages.extend('clike', {
|
|
9196
|
+
'class-name': [
|
|
9197
|
+
className,
|
|
9198
|
+
{
|
|
9199
|
+
// variables and parameters
|
|
9200
|
+
// this to support class names (or generic parameters) which do not contain a lower case letter (also works for methods)
|
|
9201
|
+
pattern: RegExp(
|
|
9202
|
+
packagePrefix + /[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source
|
|
9203
|
+
),
|
|
9204
|
+
lookbehind: true,
|
|
9205
|
+
inside: className.inside
|
|
9206
|
+
}
|
|
9207
|
+
],
|
|
9208
|
+
keyword: keywords,
|
|
9209
|
+
operator:
|
|
9210
|
+
/\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/
|
|
9211
|
+
});
|
|
9212
|
+
Prism.languages.insertBefore('dart', 'string', {
|
|
9213
|
+
'string-literal': {
|
|
9214
|
+
pattern:
|
|
9215
|
+
/r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,
|
|
9216
|
+
greedy: true,
|
|
9217
|
+
inside: {
|
|
9218
|
+
interpolation: {
|
|
9219
|
+
pattern:
|
|
9220
|
+
/((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,
|
|
9221
|
+
lookbehind: true,
|
|
9222
|
+
inside: {
|
|
9223
|
+
punctuation: /^\$\{?|\}$/,
|
|
9224
|
+
expression: {
|
|
9225
|
+
pattern: /[\s\S]+/,
|
|
9226
|
+
inside: Prism.languages.dart
|
|
9227
|
+
}
|
|
9228
|
+
}
|
|
9229
|
+
},
|
|
9230
|
+
string: /[\s\S]+/
|
|
9231
|
+
}
|
|
9232
|
+
},
|
|
9233
|
+
string: undefined
|
|
9234
|
+
});
|
|
9235
|
+
Prism.languages.insertBefore('dart', 'class-name', {
|
|
9236
|
+
metadata: {
|
|
9237
|
+
pattern: /@\w+/,
|
|
9238
|
+
alias: 'function'
|
|
9239
|
+
}
|
|
9240
|
+
});
|
|
9241
|
+
Prism.languages.insertBefore('dart', 'class-name', {
|
|
9242
|
+
generics: {
|
|
9243
|
+
pattern:
|
|
9244
|
+
/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,
|
|
9245
|
+
inside: {
|
|
9246
|
+
'class-name': className,
|
|
9247
|
+
keyword: keywords,
|
|
9248
|
+
punctuation: /[<>(),.:]/,
|
|
9249
|
+
operator: /[?&|]/
|
|
9250
|
+
}
|
|
9251
|
+
}
|
|
9252
|
+
});
|
|
9253
|
+
})(Prism);
|
|
9255
9254
|
}
|
|
9256
9255
|
|
|
9257
9256
|
var dataweave_1 = dataweave;
|
|
@@ -9338,80 +9337,89 @@ function dax(Prism) {
|
|
|
9338
9337
|
};
|
|
9339
9338
|
}
|
|
9340
9339
|
|
|
9341
|
-
var dhall_1
|
|
9342
|
-
|
|
9343
|
-
|
|
9344
|
-
function
|
|
9345
|
-
|
|
9346
|
-
|
|
9347
|
-
|
|
9348
|
-
|
|
9349
|
-
|
|
9350
|
-
|
|
9351
|
-
|
|
9352
|
-
|
|
9353
|
-
|
|
9354
|
-
|
|
9355
|
-
|
|
9356
|
-
|
|
9357
|
-
|
|
9358
|
-
|
|
9359
|
-
|
|
9360
|
-
|
|
9361
|
-
|
|
9362
|
-
|
|
9363
|
-
|
|
9364
|
-
|
|
9365
|
-
|
|
9366
|
-
|
|
9367
|
-
|
|
9368
|
-
|
|
9369
|
-
|
|
9370
|
-
|
|
9371
|
-
|
|
9372
|
-
|
|
9373
|
-
|
|
9374
|
-
|
|
9375
|
-
|
|
9376
|
-
|
|
9377
|
-
|
|
9378
|
-
|
|
9379
|
-
|
|
9380
|
-
|
|
9381
|
-
|
|
9382
|
-
|
|
9383
|
-
|
|
9384
|
-
|
|
9385
|
-
|
|
9386
|
-
|
|
9387
|
-
|
|
9388
|
-
|
|
9389
|
-
|
|
9390
|
-
|
|
9391
|
-
|
|
9392
|
-
|
|
9393
|
-
|
|
9394
|
-
|
|
9395
|
-
|
|
9396
|
-
|
|
9397
|
-
|
|
9398
|
-
|
|
9399
|
-
|
|
9400
|
-
|
|
9401
|
-
|
|
9402
|
-
|
|
9403
|
-
|
|
9404
|
-
|
|
9405
|
-
|
|
9406
|
-
|
|
9407
|
-
|
|
9408
|
-
|
|
9409
|
-
|
|
9410
|
-
|
|
9411
|
-
|
|
9412
|
-
|
|
9413
|
-
|
|
9414
|
-
|
|
9340
|
+
var dhall_1;
|
|
9341
|
+
var hasRequiredDhall;
|
|
9342
|
+
|
|
9343
|
+
function requireDhall () {
|
|
9344
|
+
if (hasRequiredDhall) return dhall_1;
|
|
9345
|
+
hasRequiredDhall = 1;
|
|
9346
|
+
|
|
9347
|
+
dhall_1 = dhall;
|
|
9348
|
+
dhall.displayName = 'dhall';
|
|
9349
|
+
dhall.aliases = [];
|
|
9350
|
+
function dhall(Prism) {
|
|
9351
|
+
// ABNF grammar:
|
|
9352
|
+
// https://github.com/dhall-lang/dhall-lang/blob/master/standard/dhall.abnf
|
|
9353
|
+
Prism.languages.dhall = {
|
|
9354
|
+
// Multi-line comments can be nested. E.g. {- foo {- bar -} -}
|
|
9355
|
+
// The multi-line pattern is essentially this:
|
|
9356
|
+
// \{-(?:[^-{]|-(?!\})|\{(?!-)|<SELF>)*-\}
|
|
9357
|
+
comment:
|
|
9358
|
+
/--.*|\{-(?:[^-{]|-(?!\})|\{(?!-)|\{-(?:[^-{]|-(?!\})|\{(?!-))*-\})*-\}/,
|
|
9359
|
+
string: {
|
|
9360
|
+
pattern: /"(?:[^"\\]|\\.)*"|''(?:[^']|'(?!')|'''|''\$\{)*''(?!'|\$)/,
|
|
9361
|
+
greedy: true,
|
|
9362
|
+
inside: {
|
|
9363
|
+
interpolation: {
|
|
9364
|
+
pattern: /\$\{[^{}]*\}/,
|
|
9365
|
+
inside: {
|
|
9366
|
+
expression: {
|
|
9367
|
+
pattern: /(^\$\{)[\s\S]+(?=\}$)/,
|
|
9368
|
+
lookbehind: true,
|
|
9369
|
+
alias: 'language-dhall',
|
|
9370
|
+
inside: null // see blow
|
|
9371
|
+
},
|
|
9372
|
+
punctuation: /\$\{|\}/
|
|
9373
|
+
}
|
|
9374
|
+
}
|
|
9375
|
+
}
|
|
9376
|
+
},
|
|
9377
|
+
label: {
|
|
9378
|
+
pattern: /`[^`]*`/,
|
|
9379
|
+
greedy: true
|
|
9380
|
+
},
|
|
9381
|
+
url: {
|
|
9382
|
+
// https://github.com/dhall-lang/dhall-lang/blob/5fde8ef1bead6fb4e999d3c1ffe7044cd019d63a/standard/dhall.abnf#L596
|
|
9383
|
+
pattern:
|
|
9384
|
+
/\bhttps?:\/\/[\w.:%!$&'*+;=@~-]+(?:\/[\w.:%!$&'*+;=@~-]*)*(?:\?[/?\w.:%!$&'*+;=@~-]*)?/,
|
|
9385
|
+
greedy: true
|
|
9386
|
+
},
|
|
9387
|
+
env: {
|
|
9388
|
+
// https://github.com/dhall-lang/dhall-lang/blob/5fde8ef1bead6fb4e999d3c1ffe7044cd019d63a/standard/dhall.abnf#L661
|
|
9389
|
+
pattern: /\benv:(?:(?!\d)\w+|"(?:[^"\\=]|\\.)*")/,
|
|
9390
|
+
greedy: true,
|
|
9391
|
+
inside: {
|
|
9392
|
+
function: /^env/,
|
|
9393
|
+
operator: /^:/,
|
|
9394
|
+
variable: /[\s\S]+/
|
|
9395
|
+
}
|
|
9396
|
+
},
|
|
9397
|
+
hash: {
|
|
9398
|
+
// https://github.com/dhall-lang/dhall-lang/blob/5fde8ef1bead6fb4e999d3c1ffe7044cd019d63a/standard/dhall.abnf#L725
|
|
9399
|
+
pattern: /\bsha256:[\da-fA-F]{64}\b/,
|
|
9400
|
+
inside: {
|
|
9401
|
+
function: /sha256/,
|
|
9402
|
+
operator: /:/,
|
|
9403
|
+
number: /[\da-fA-F]{64}/
|
|
9404
|
+
}
|
|
9405
|
+
},
|
|
9406
|
+
// https://github.com/dhall-lang/dhall-lang/blob/5fde8ef1bead6fb4e999d3c1ffe7044cd019d63a/standard/dhall.abnf#L359
|
|
9407
|
+
keyword:
|
|
9408
|
+
/\b(?:as|assert|else|forall|if|in|let|merge|missing|then|toMap|using|with)\b|\u2200/,
|
|
9409
|
+
builtin: /\b(?:None|Some)\b/,
|
|
9410
|
+
boolean: /\b(?:False|True)\b/,
|
|
9411
|
+
number:
|
|
9412
|
+
/\bNaN\b|-?\bInfinity\b|[+-]?\b(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/,
|
|
9413
|
+
operator:
|
|
9414
|
+
/\/\\|\/\/\\\\|&&|\|\||===|[!=]=|\/\/|->|\+\+|::|[+*#@=:?<>|\\\u2227\u2a53\u2261\u2afd\u03bb\u2192]/,
|
|
9415
|
+
punctuation: /\.\.|[{}\[\](),./]/,
|
|
9416
|
+
// we'll just assume that every capital word left is a type name
|
|
9417
|
+
'class-name': /\b[A-Z]\w*\b/
|
|
9418
|
+
};
|
|
9419
|
+
Prism.languages.dhall.string.inside.interpolation.inside.expression.inside =
|
|
9420
|
+
Prism.languages.dhall;
|
|
9421
|
+
}
|
|
9422
|
+
return dhall_1;
|
|
9415
9423
|
}
|
|
9416
9424
|
|
|
9417
9425
|
var diff_1 = diff;
|
|
@@ -9604,73 +9612,65 @@ function requireMarkupTemplating () {
|
|
|
9604
9612
|
return markupTemplating_1;
|
|
9605
9613
|
}
|
|
9606
9614
|
|
|
9607
|
-
var
|
|
9608
|
-
var
|
|
9609
|
-
|
|
9610
|
-
|
|
9611
|
-
|
|
9612
|
-
|
|
9613
|
-
|
|
9614
|
-
|
|
9615
|
-
|
|
9616
|
-
|
|
9617
|
-
|
|
9618
|
-
|
|
9619
|
-
|
|
9620
|
-
|
|
9621
|
-
|
|
9622
|
-
|
|
9623
|
-
|
|
9624
|
-
|
|
9625
|
-
|
|
9626
|
-
|
|
9627
|
-
|
|
9628
|
-
|
|
9629
|
-
|
|
9630
|
-
|
|
9631
|
-
|
|
9632
|
-
|
|
9633
|
-
|
|
9634
|
-
|
|
9635
|
-
|
|
9636
|
-
|
|
9637
|
-
|
|
9638
|
-
|
|
9639
|
-
|
|
9640
|
-
|
|
9641
|
-
|
|
9642
|
-
|
|
9643
|
-
|
|
9644
|
-
|
|
9645
|
-
|
|
9646
|
-
|
|
9647
|
-
|
|
9648
|
-
|
|
9649
|
-
|
|
9650
|
-
|
|
9651
|
-
|
|
9652
|
-
|
|
9653
|
-
|
|
9654
|
-
|
|
9655
|
-
|
|
9656
|
-
|
|
9657
|
-
|
|
9658
|
-
|
|
9659
|
-
|
|
9660
|
-
|
|
9661
|
-
|
|
9662
|
-
|
|
9663
|
-
|
|
9664
|
-
|
|
9665
|
-
|
|
9666
|
-
markupTemplating.buildPlaceholders(env, 'jinja2', pattern);
|
|
9667
|
-
});
|
|
9668
|
-
Prism.hooks.add('after-tokenize', function (env) {
|
|
9669
|
-
markupTemplating.tokenizePlaceholders(env, 'jinja2');
|
|
9670
|
-
});
|
|
9671
|
-
})(Prism);
|
|
9672
|
-
}
|
|
9673
|
-
return django_1;
|
|
9615
|
+
var refractorMarkupTemplating$1 = requireMarkupTemplating();
|
|
9616
|
+
var django_1 = django;
|
|
9617
|
+
django.displayName = 'django';
|
|
9618
|
+
django.aliases = ['jinja2'];
|
|
9619
|
+
function django(Prism) {
|
|
9620
|
+
Prism.register(refractorMarkupTemplating$1)
|
|
9621
|
+
// Django/Jinja2 syntax definition for Prism.js <http://prismjs.com> syntax highlighter.
|
|
9622
|
+
// Mostly it works OK but can paint code incorrectly on complex html/template tag combinations.
|
|
9623
|
+
;(function (Prism) {
|
|
9624
|
+
Prism.languages.django = {
|
|
9625
|
+
comment: /^\{#[\s\S]*?#\}$/,
|
|
9626
|
+
tag: {
|
|
9627
|
+
pattern: /(^\{%[+-]?\s*)\w+/,
|
|
9628
|
+
lookbehind: true,
|
|
9629
|
+
alias: 'keyword'
|
|
9630
|
+
},
|
|
9631
|
+
delimiter: {
|
|
9632
|
+
pattern: /^\{[{%][+-]?|[+-]?[}%]\}$/,
|
|
9633
|
+
alias: 'punctuation'
|
|
9634
|
+
},
|
|
9635
|
+
string: {
|
|
9636
|
+
pattern: /("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
|
|
9637
|
+
greedy: true
|
|
9638
|
+
},
|
|
9639
|
+
filter: {
|
|
9640
|
+
pattern: /(\|)\w+/,
|
|
9641
|
+
lookbehind: true,
|
|
9642
|
+
alias: 'function'
|
|
9643
|
+
},
|
|
9644
|
+
test: {
|
|
9645
|
+
pattern: /(\bis\s+(?:not\s+)?)(?!not\b)\w+/,
|
|
9646
|
+
lookbehind: true,
|
|
9647
|
+
alias: 'function'
|
|
9648
|
+
},
|
|
9649
|
+
function: /\b[a-z_]\w+(?=\s*\()/i,
|
|
9650
|
+
keyword:
|
|
9651
|
+
/\b(?:and|as|by|else|for|if|import|in|is|loop|not|or|recursive|with|without)\b/,
|
|
9652
|
+
operator: /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,
|
|
9653
|
+
number: /\b\d+(?:\.\d+)?\b/,
|
|
9654
|
+
boolean: /[Ff]alse|[Nn]one|[Tt]rue/,
|
|
9655
|
+
variable: /\b\w+\b/,
|
|
9656
|
+
punctuation: /[{}[\](),.:;]/
|
|
9657
|
+
};
|
|
9658
|
+
var pattern = /\{\{[\s\S]*?\}\}|\{%[\s\S]*?%\}|\{#[\s\S]*?#\}/g;
|
|
9659
|
+
var markupTemplating = Prism.languages['markup-templating'];
|
|
9660
|
+
Prism.hooks.add('before-tokenize', function (env) {
|
|
9661
|
+
markupTemplating.buildPlaceholders(env, 'django', pattern);
|
|
9662
|
+
});
|
|
9663
|
+
Prism.hooks.add('after-tokenize', function (env) {
|
|
9664
|
+
markupTemplating.tokenizePlaceholders(env, 'django');
|
|
9665
|
+
}); // Add an Jinja2 alias
|
|
9666
|
+
Prism.languages.jinja2 = Prism.languages.django;
|
|
9667
|
+
Prism.hooks.add('before-tokenize', function (env) {
|
|
9668
|
+
markupTemplating.buildPlaceholders(env, 'jinja2', pattern);
|
|
9669
|
+
});
|
|
9670
|
+
Prism.hooks.add('after-tokenize', function (env) {
|
|
9671
|
+
markupTemplating.tokenizePlaceholders(env, 'jinja2');
|
|
9672
|
+
});
|
|
9673
|
+
})(Prism);
|
|
9674
9674
|
}
|
|
9675
9675
|
|
|
9676
9676
|
var dnsZoneFile_1 = dnsZoneFile;
|
|
@@ -9952,37 +9952,46 @@ function requireEbnf () {
|
|
|
9952
9952
|
return ebnf_1;
|
|
9953
9953
|
}
|
|
9954
9954
|
|
|
9955
|
-
var editorconfig_1
|
|
9956
|
-
|
|
9957
|
-
|
|
9958
|
-
function
|
|
9959
|
-
|
|
9960
|
-
|
|
9961
|
-
|
|
9962
|
-
|
|
9963
|
-
|
|
9964
|
-
|
|
9965
|
-
|
|
9966
|
-
|
|
9967
|
-
|
|
9968
|
-
|
|
9969
|
-
|
|
9970
|
-
|
|
9971
|
-
|
|
9972
|
-
|
|
9973
|
-
|
|
9974
|
-
|
|
9975
|
-
|
|
9976
|
-
|
|
9977
|
-
|
|
9978
|
-
|
|
9979
|
-
|
|
9980
|
-
|
|
9981
|
-
|
|
9982
|
-
|
|
9983
|
-
|
|
9984
|
-
|
|
9985
|
-
|
|
9955
|
+
var editorconfig_1;
|
|
9956
|
+
var hasRequiredEditorconfig;
|
|
9957
|
+
|
|
9958
|
+
function requireEditorconfig () {
|
|
9959
|
+
if (hasRequiredEditorconfig) return editorconfig_1;
|
|
9960
|
+
hasRequiredEditorconfig = 1;
|
|
9961
|
+
|
|
9962
|
+
editorconfig_1 = editorconfig;
|
|
9963
|
+
editorconfig.displayName = 'editorconfig';
|
|
9964
|
+
editorconfig.aliases = [];
|
|
9965
|
+
function editorconfig(Prism) {
|
|
9966
|
+
Prism.languages.editorconfig = {
|
|
9967
|
+
// https://editorconfig-specification.readthedocs.io
|
|
9968
|
+
comment: /[;#].*/,
|
|
9969
|
+
section: {
|
|
9970
|
+
pattern: /(^[ \t]*)\[.+\]/m,
|
|
9971
|
+
lookbehind: true,
|
|
9972
|
+
alias: 'selector',
|
|
9973
|
+
inside: {
|
|
9974
|
+
regex: /\\\\[\[\]{},!?.*]/,
|
|
9975
|
+
// Escape special characters with '\\'
|
|
9976
|
+
operator: /[!?]|\.\.|\*{1,2}/,
|
|
9977
|
+
punctuation: /[\[\]{},]/
|
|
9978
|
+
}
|
|
9979
|
+
},
|
|
9980
|
+
key: {
|
|
9981
|
+
pattern: /(^[ \t]*)[^\s=]+(?=[ \t]*=)/m,
|
|
9982
|
+
lookbehind: true,
|
|
9983
|
+
alias: 'attr-name'
|
|
9984
|
+
},
|
|
9985
|
+
value: {
|
|
9986
|
+
pattern: /=.*/,
|
|
9987
|
+
alias: 'attr-value',
|
|
9988
|
+
inside: {
|
|
9989
|
+
punctuation: /^=/
|
|
9990
|
+
}
|
|
9991
|
+
}
|
|
9992
|
+
};
|
|
9993
|
+
}
|
|
9994
|
+
return editorconfig_1;
|
|
9986
9995
|
}
|
|
9987
9996
|
|
|
9988
9997
|
var eiffel_1;
|
|
@@ -10032,45 +10041,37 @@ function requireEiffel () {
|
|
|
10032
10041
|
return eiffel_1;
|
|
10033
10042
|
}
|
|
10034
10043
|
|
|
10035
|
-
var
|
|
10036
|
-
var
|
|
10037
|
-
|
|
10038
|
-
|
|
10039
|
-
|
|
10040
|
-
|
|
10041
|
-
|
|
10042
|
-
|
|
10043
|
-
|
|
10044
|
-
|
|
10045
|
-
|
|
10046
|
-
|
|
10047
|
-
|
|
10048
|
-
|
|
10049
|
-
|
|
10050
|
-
|
|
10051
|
-
|
|
10052
|
-
|
|
10053
|
-
|
|
10054
|
-
|
|
10055
|
-
|
|
10056
|
-
|
|
10057
|
-
|
|
10058
|
-
|
|
10059
|
-
|
|
10060
|
-
|
|
10061
|
-
|
|
10062
|
-
|
|
10063
|
-
|
|
10064
|
-
|
|
10065
|
-
|
|
10066
|
-
});
|
|
10067
|
-
Prism.hooks.add('after-tokenize', function (env) {
|
|
10068
|
-
Prism.languages['markup-templating'].tokenizePlaceholders(env, 'ejs');
|
|
10069
|
-
});
|
|
10070
|
-
Prism.languages.eta = Prism.languages.ejs;
|
|
10071
|
-
})(Prism);
|
|
10072
|
-
}
|
|
10073
|
-
return ejs_1;
|
|
10044
|
+
var refractorMarkupTemplating = requireMarkupTemplating();
|
|
10045
|
+
var ejs_1 = ejs;
|
|
10046
|
+
ejs.displayName = 'ejs';
|
|
10047
|
+
ejs.aliases = ['eta'];
|
|
10048
|
+
function ejs(Prism) {
|
|
10049
|
+
Prism.register(refractorMarkupTemplating)
|
|
10050
|
+
;(function (Prism) {
|
|
10051
|
+
Prism.languages.ejs = {
|
|
10052
|
+
delimiter: {
|
|
10053
|
+
pattern: /^<%[-_=]?|[-_]?%>$/,
|
|
10054
|
+
alias: 'punctuation'
|
|
10055
|
+
},
|
|
10056
|
+
comment: /^#[\s\S]*/,
|
|
10057
|
+
'language-javascript': {
|
|
10058
|
+
pattern: /[\s\S]+/,
|
|
10059
|
+
inside: Prism.languages.javascript
|
|
10060
|
+
}
|
|
10061
|
+
};
|
|
10062
|
+
Prism.hooks.add('before-tokenize', function (env) {
|
|
10063
|
+
var ejsPattern = /<%(?!%)[\s\S]+?%>/g;
|
|
10064
|
+
Prism.languages['markup-templating'].buildPlaceholders(
|
|
10065
|
+
env,
|
|
10066
|
+
'ejs',
|
|
10067
|
+
ejsPattern
|
|
10068
|
+
);
|
|
10069
|
+
});
|
|
10070
|
+
Prism.hooks.add('after-tokenize', function (env) {
|
|
10071
|
+
Prism.languages['markup-templating'].tokenizePlaceholders(env, 'ejs');
|
|
10072
|
+
});
|
|
10073
|
+
Prism.languages.eta = Prism.languages.ejs;
|
|
10074
|
+
})(Prism);
|
|
10074
10075
|
}
|
|
10075
10076
|
|
|
10076
10077
|
var elixir_1;
|
|
@@ -27958,28 +27959,28 @@ refractor.register(cobol_1);
|
|
|
27958
27959
|
refractor.register(coffeescript_1);
|
|
27959
27960
|
refractor.register(concurnas_1);
|
|
27960
27961
|
refractor.register(coq_1);
|
|
27961
|
-
refractor.register(
|
|
27962
|
+
refractor.register(requireCpp());
|
|
27962
27963
|
refractor.register(crystal_1);
|
|
27963
27964
|
refractor.register(csharp_1);
|
|
27964
27965
|
refractor.register(cshtml_1);
|
|
27965
27966
|
refractor.register(csp_1);
|
|
27966
27967
|
refractor.register(cssExtras_1);
|
|
27967
|
-
refractor.register(
|
|
27968
|
-
refractor.register(
|
|
27968
|
+
refractor.register(requireCsv());
|
|
27969
|
+
refractor.register(cypher_1);
|
|
27969
27970
|
refractor.register(d_1);
|
|
27970
|
-
refractor.register(
|
|
27971
|
+
refractor.register(dart_1);
|
|
27971
27972
|
refractor.register(dataweave_1);
|
|
27972
27973
|
refractor.register(dax_1);
|
|
27973
|
-
refractor.register(
|
|
27974
|
+
refractor.register(requireDhall());
|
|
27974
27975
|
refractor.register(diff_1);
|
|
27975
|
-
refractor.register(
|
|
27976
|
+
refractor.register(django_1);
|
|
27976
27977
|
refractor.register(dnsZoneFile_1);
|
|
27977
27978
|
refractor.register(docker_1);
|
|
27978
27979
|
refractor.register(dot_1);
|
|
27979
27980
|
refractor.register(requireEbnf());
|
|
27980
|
-
refractor.register(
|
|
27981
|
+
refractor.register(requireEditorconfig());
|
|
27981
27982
|
refractor.register(requireEiffel());
|
|
27982
|
-
refractor.register(
|
|
27983
|
+
refractor.register(ejs_1);
|
|
27983
27984
|
refractor.register(requireElixir());
|
|
27984
27985
|
refractor.register(requireElm());
|
|
27985
27986
|
refractor.register(requireErb());
|
|
@@ -38956,6 +38957,18 @@ function escapeContentForStream(content) {
|
|
|
38956
38957
|
}
|
|
38957
38958
|
|
|
38958
38959
|
var renderTimer = null;
|
|
38960
|
+
/**
|
|
38961
|
+
* 预处理 MDX 内容,转义可能被误认为 HTML 标签的内容
|
|
38962
|
+
* @param content MDX 内容
|
|
38963
|
+
* @returns 处理后的内容
|
|
38964
|
+
*/
|
|
38965
|
+
function preprocessMdxContent(content) {
|
|
38966
|
+
// 匹配可能被误认为 HTML 标签的模式,如 <数字、<字母但不是真正的组件标签
|
|
38967
|
+
// 真正的 React 组件标签应该以大写字母开头,如 <Component>
|
|
38968
|
+
// HTML 标签以小写字母开头,如 <div>
|
|
38969
|
+
// 需要排除正常的闭合标签 </Component>
|
|
38970
|
+
return content.replace(/<(?!\/|[A-Z][a-zA-Z]*\b|[a-z][a-zA-Z0-9]*\b)/g, '<');
|
|
38971
|
+
}
|
|
38959
38972
|
// 辅助函数:格式化props
|
|
38960
38973
|
function formatProps(props) {
|
|
38961
38974
|
return Object.entries(props).map(function (_a) {
|
|
@@ -38975,7 +38988,7 @@ function formatProps(props) {
|
|
|
38975
38988
|
}
|
|
38976
38989
|
function renderMdx(mdxContent, scope, registeredComponents) {
|
|
38977
38990
|
return __awaiter(this, void 0, void 0, function () {
|
|
38978
|
-
var componentTagRegex, usedComponents, match, vf, XComponent;
|
|
38991
|
+
var componentTagRegex, usedComponents, match, processedContent, vf, XComponent, e_1;
|
|
38979
38992
|
return __generator(this, function (_a) {
|
|
38980
38993
|
switch (_a.label) {
|
|
38981
38994
|
case 0:
|
|
@@ -38987,7 +39000,8 @@ function renderMdx(mdxContent, scope, registeredComponents) {
|
|
|
38987
39000
|
while ((match = componentTagRegex.exec(mdxContent)) !== null) {
|
|
38988
39001
|
usedComponents.add(match[1]);
|
|
38989
39002
|
}
|
|
38990
|
-
|
|
39003
|
+
processedContent = preprocessMdxContent(mdxContent);
|
|
39004
|
+
return [4 /*yield*/, mdx.compile(processedContent, {
|
|
38991
39005
|
outputFormat: "function-body",
|
|
38992
39006
|
remarkPlugins: [[RemarkMath, {
|
|
38993
39007
|
strict: true
|
|
@@ -39010,7 +39024,8 @@ function renderMdx(mdxContent, scope, registeredComponents) {
|
|
|
39010
39024
|
scope: scope
|
|
39011
39025
|
})];
|
|
39012
39026
|
case 3:
|
|
39013
|
-
_a.sent();
|
|
39027
|
+
e_1 = _a.sent();
|
|
39028
|
+
console.log(e_1, 'e');
|
|
39014
39029
|
return [2 /*return*/, new Promise(function (resolve) {
|
|
39015
39030
|
renderTimer = setTimeout(function () {
|
|
39016
39031
|
resolve(/*#__PURE__*/React__namespace.createElement('div', {
|