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.js
CHANGED
|
@@ -5753,126 +5753,134 @@ function c(Prism) {
|
|
|
5753
5753
|
delete Prism.languages.c['boolean'];
|
|
5754
5754
|
}
|
|
5755
5755
|
|
|
5756
|
-
var
|
|
5757
|
-
var
|
|
5758
|
-
|
|
5759
|
-
|
|
5760
|
-
|
|
5761
|
-
|
|
5762
|
-
|
|
5763
|
-
|
|
5764
|
-
|
|
5765
|
-
|
|
5766
|
-
|
|
5767
|
-
|
|
5768
|
-
|
|
5769
|
-
|
|
5770
|
-
|
|
5771
|
-
|
|
5772
|
-
|
|
5773
|
-
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
|
|
5777
|
-
|
|
5778
|
-
|
|
5779
|
-
|
|
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
|
-
|
|
5756
|
+
var cpp_1;
|
|
5757
|
+
var hasRequiredCpp;
|
|
5758
|
+
|
|
5759
|
+
function requireCpp () {
|
|
5760
|
+
if (hasRequiredCpp) return cpp_1;
|
|
5761
|
+
hasRequiredCpp = 1;
|
|
5762
|
+
var refractorC = c_1;
|
|
5763
|
+
cpp_1 = cpp;
|
|
5764
|
+
cpp.displayName = 'cpp';
|
|
5765
|
+
cpp.aliases = [];
|
|
5766
|
+
function cpp(Prism) {
|
|
5767
|
+
Prism.register(refractorC)
|
|
5768
|
+
;(function (Prism) {
|
|
5769
|
+
var keyword =
|
|
5770
|
+
/\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/;
|
|
5771
|
+
var modName = /\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(
|
|
5772
|
+
/<keyword>/g,
|
|
5773
|
+
function () {
|
|
5774
|
+
return keyword.source
|
|
5775
|
+
}
|
|
5776
|
+
);
|
|
5777
|
+
Prism.languages.cpp = Prism.languages.extend('c', {
|
|
5778
|
+
'class-name': [
|
|
5779
|
+
{
|
|
5780
|
+
pattern: RegExp(
|
|
5781
|
+
/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(
|
|
5782
|
+
/<keyword>/g,
|
|
5783
|
+
function () {
|
|
5784
|
+
return keyword.source
|
|
5785
|
+
}
|
|
5786
|
+
)
|
|
5787
|
+
),
|
|
5788
|
+
lookbehind: true
|
|
5789
|
+
}, // This is intended to capture the class name of method implementations like:
|
|
5790
|
+
// void foo::bar() const {}
|
|
5791
|
+
// However! The `foo` in the above example could also be a namespace, so we only capture the class name if
|
|
5792
|
+
// it starts with an uppercase letter. This approximation should give decent results.
|
|
5793
|
+
/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/, // This will capture the class name before destructors like:
|
|
5794
|
+
// Foo::~Foo() {}
|
|
5795
|
+
/\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
|
|
5796
|
+
// parameters, so it can't be a namespace (until C++ adds generic namespaces).
|
|
5797
|
+
/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/
|
|
5798
|
+
],
|
|
5799
|
+
keyword: keyword,
|
|
5800
|
+
number: {
|
|
5801
|
+
pattern:
|
|
5802
|
+
/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,
|
|
5803
|
+
greedy: true
|
|
5804
|
+
},
|
|
5805
|
+
operator:
|
|
5806
|
+
/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,
|
|
5807
|
+
boolean: /\b(?:false|true)\b/
|
|
5808
|
+
});
|
|
5809
|
+
Prism.languages.insertBefore('cpp', 'string', {
|
|
5810
|
+
module: {
|
|
5811
|
+
// https://en.cppreference.com/w/cpp/language/modules
|
|
5812
|
+
pattern: RegExp(
|
|
5813
|
+
/(\b(?:import|module)\s+)/.source +
|
|
5814
|
+
'(?:' + // header-name
|
|
5815
|
+
/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source +
|
|
5816
|
+
'|' + // module name or partition or both
|
|
5817
|
+
/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(
|
|
5818
|
+
/<mod-name>/g,
|
|
5819
|
+
function () {
|
|
5820
|
+
return modName
|
|
5821
|
+
}
|
|
5822
|
+
) +
|
|
5823
|
+
')'
|
|
5824
|
+
),
|
|
5825
|
+
lookbehind: true,
|
|
5826
|
+
greedy: true,
|
|
5827
|
+
inside: {
|
|
5828
|
+
string: /^[<"][\s\S]+/,
|
|
5829
|
+
operator: /:/,
|
|
5830
|
+
punctuation: /\./
|
|
5831
|
+
}
|
|
5832
|
+
},
|
|
5833
|
+
'raw-string': {
|
|
5834
|
+
pattern: /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,
|
|
5835
|
+
alias: 'string',
|
|
5836
|
+
greedy: true
|
|
5837
|
+
}
|
|
5838
|
+
});
|
|
5839
|
+
Prism.languages.insertBefore('cpp', 'keyword', {
|
|
5840
|
+
'generic-function': {
|
|
5841
|
+
pattern: /\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,
|
|
5842
|
+
inside: {
|
|
5843
|
+
function: /^\w+/,
|
|
5844
|
+
generic: {
|
|
5845
|
+
pattern: /<[\s\S]+/,
|
|
5846
|
+
alias: 'class-name',
|
|
5847
|
+
inside: Prism.languages.cpp
|
|
5848
|
+
}
|
|
5849
|
+
}
|
|
5850
|
+
}
|
|
5851
|
+
});
|
|
5852
|
+
Prism.languages.insertBefore('cpp', 'operator', {
|
|
5853
|
+
'double-colon': {
|
|
5854
|
+
pattern: /::/,
|
|
5855
|
+
alias: 'punctuation'
|
|
5856
|
+
}
|
|
5857
|
+
});
|
|
5858
|
+
Prism.languages.insertBefore('cpp', 'class-name', {
|
|
5859
|
+
// the base clause is an optional list of parent classes
|
|
5860
|
+
// https://en.cppreference.com/w/cpp/language/class
|
|
5861
|
+
'base-clause': {
|
|
5862
|
+
pattern:
|
|
5863
|
+
/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,
|
|
5864
|
+
lookbehind: true,
|
|
5865
|
+
greedy: true,
|
|
5866
|
+
inside: Prism.languages.extend('cpp', {})
|
|
5867
|
+
}
|
|
5868
|
+
});
|
|
5869
|
+
Prism.languages.insertBefore(
|
|
5870
|
+
'inside',
|
|
5871
|
+
'double-colon',
|
|
5872
|
+
{
|
|
5873
|
+
// All untokenized words that are not namespaces should be class names
|
|
5874
|
+
'class-name': /\b[a-z_]\w*\b(?!\s*::)/i
|
|
5875
|
+
},
|
|
5876
|
+
Prism.languages.cpp['base-clause']
|
|
5877
|
+
);
|
|
5878
|
+
})(Prism);
|
|
5879
|
+
}
|
|
5880
|
+
return cpp_1;
|
|
5873
5881
|
}
|
|
5874
5882
|
|
|
5875
|
-
var refractorCpp$1 =
|
|
5883
|
+
var refractorCpp$1 = requireCpp();
|
|
5876
5884
|
var arduino_1 = arduino;
|
|
5877
5885
|
arduino.displayName = 'arduino';
|
|
5878
5886
|
arduino.aliases = ['ino'];
|
|
@@ -7873,7 +7881,7 @@ function cfscript(Prism) {
|
|
|
7873
7881
|
Prism.languages.cfc = Prism.languages['cfscript'];
|
|
7874
7882
|
}
|
|
7875
7883
|
|
|
7876
|
-
var refractorCpp =
|
|
7884
|
+
var refractorCpp = requireCpp();
|
|
7877
7885
|
var chaiscript_1 = chaiscript;
|
|
7878
7886
|
chaiscript.displayName = 'chaiscript';
|
|
7879
7887
|
chaiscript.aliases = [];
|
|
@@ -8993,64 +9001,64 @@ function cssExtras(Prism) {
|
|
|
8993
9001
|
})(Prism);
|
|
8994
9002
|
}
|
|
8995
9003
|
|
|
8996
|
-
var csv_1
|
|
8997
|
-
|
|
8998
|
-
csv.aliases = [];
|
|
8999
|
-
function csv(Prism) {
|
|
9000
|
-
// https://tools.ietf.org/html/rfc4180
|
|
9001
|
-
Prism.languages.csv = {
|
|
9002
|
-
value: /[^\r\n,"]+|"(?:[^"]|"")*"(?!")/,
|
|
9003
|
-
punctuation: /,/
|
|
9004
|
-
};
|
|
9005
|
-
}
|
|
9004
|
+
var csv_1;
|
|
9005
|
+
var hasRequiredCsv;
|
|
9006
9006
|
|
|
9007
|
-
|
|
9008
|
-
|
|
9007
|
+
function requireCsv () {
|
|
9008
|
+
if (hasRequiredCsv) return csv_1;
|
|
9009
|
+
hasRequiredCsv = 1;
|
|
9009
9010
|
|
|
9010
|
-
|
|
9011
|
-
|
|
9012
|
-
|
|
9013
|
-
|
|
9014
|
-
|
|
9015
|
-
|
|
9016
|
-
|
|
9017
|
-
|
|
9018
|
-
Prism.languages.cypher = {
|
|
9019
|
-
// https://neo4j.com/docs/cypher-manual/current/syntax/comments/
|
|
9020
|
-
comment: /\/\/.*/,
|
|
9021
|
-
string: {
|
|
9022
|
-
pattern: /"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/,
|
|
9023
|
-
greedy: true
|
|
9024
|
-
},
|
|
9025
|
-
'class-name': {
|
|
9026
|
-
pattern: /(:\s*)(?:\w+|`(?:[^`\\\r\n])*`)(?=\s*[{):])/,
|
|
9027
|
-
lookbehind: true,
|
|
9028
|
-
greedy: true
|
|
9029
|
-
},
|
|
9030
|
-
relationship: {
|
|
9031
|
-
pattern:
|
|
9032
|
-
/(-\[\s*(?:\w+\s*|`(?:[^`\\\r\n])*`\s*)?:\s*|\|\s*:\s*)(?:\w+|`(?:[^`\\\r\n])*`)/,
|
|
9033
|
-
lookbehind: true,
|
|
9034
|
-
greedy: true,
|
|
9035
|
-
alias: 'property'
|
|
9036
|
-
},
|
|
9037
|
-
identifier: {
|
|
9038
|
-
pattern: /`(?:[^`\\\r\n])*`/,
|
|
9039
|
-
greedy: true
|
|
9040
|
-
},
|
|
9041
|
-
variable: /\$\w+/,
|
|
9042
|
-
// https://neo4j.com/docs/cypher-manual/current/syntax/reserved/
|
|
9043
|
-
keyword:
|
|
9044
|
-
/\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,
|
|
9045
|
-
function: /\b\w+\b(?=\s*\()/,
|
|
9046
|
-
boolean: /\b(?:false|null|true)\b/i,
|
|
9047
|
-
number: /\b(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)\b/,
|
|
9048
|
-
// https://neo4j.com/docs/cypher-manual/current/syntax/operators/
|
|
9049
|
-
operator: /:|<--?|--?>?|<>|=~?|[<>]=?|[+*/%^|]|\.\.\.?/,
|
|
9050
|
-
punctuation: /[()[\]{},;.]/
|
|
9011
|
+
csv_1 = csv;
|
|
9012
|
+
csv.displayName = 'csv';
|
|
9013
|
+
csv.aliases = [];
|
|
9014
|
+
function csv(Prism) {
|
|
9015
|
+
// https://tools.ietf.org/html/rfc4180
|
|
9016
|
+
Prism.languages.csv = {
|
|
9017
|
+
value: /[^\r\n,"]+|"(?:[^"]|"")*"(?!")/,
|
|
9018
|
+
punctuation: /,/
|
|
9051
9019
|
};
|
|
9052
9020
|
}
|
|
9053
|
-
return
|
|
9021
|
+
return csv_1;
|
|
9022
|
+
}
|
|
9023
|
+
|
|
9024
|
+
var cypher_1 = cypher;
|
|
9025
|
+
cypher.displayName = 'cypher';
|
|
9026
|
+
cypher.aliases = [];
|
|
9027
|
+
function cypher(Prism) {
|
|
9028
|
+
Prism.languages.cypher = {
|
|
9029
|
+
// https://neo4j.com/docs/cypher-manual/current/syntax/comments/
|
|
9030
|
+
comment: /\/\/.*/,
|
|
9031
|
+
string: {
|
|
9032
|
+
pattern: /"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/,
|
|
9033
|
+
greedy: true
|
|
9034
|
+
},
|
|
9035
|
+
'class-name': {
|
|
9036
|
+
pattern: /(:\s*)(?:\w+|`(?:[^`\\\r\n])*`)(?=\s*[{):])/,
|
|
9037
|
+
lookbehind: true,
|
|
9038
|
+
greedy: true
|
|
9039
|
+
},
|
|
9040
|
+
relationship: {
|
|
9041
|
+
pattern:
|
|
9042
|
+
/(-\[\s*(?:\w+\s*|`(?:[^`\\\r\n])*`\s*)?:\s*|\|\s*:\s*)(?:\w+|`(?:[^`\\\r\n])*`)/,
|
|
9043
|
+
lookbehind: true,
|
|
9044
|
+
greedy: true,
|
|
9045
|
+
alias: 'property'
|
|
9046
|
+
},
|
|
9047
|
+
identifier: {
|
|
9048
|
+
pattern: /`(?:[^`\\\r\n])*`/,
|
|
9049
|
+
greedy: true
|
|
9050
|
+
},
|
|
9051
|
+
variable: /\$\w+/,
|
|
9052
|
+
// https://neo4j.com/docs/cypher-manual/current/syntax/reserved/
|
|
9053
|
+
keyword:
|
|
9054
|
+
/\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,
|
|
9055
|
+
function: /\b\w+\b(?=\s*\()/,
|
|
9056
|
+
boolean: /\b(?:false|null|true)\b/i,
|
|
9057
|
+
number: /\b(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)\b/,
|
|
9058
|
+
// https://neo4j.com/docs/cypher-manual/current/syntax/operators/
|
|
9059
|
+
operator: /:|<--?|--?>?|<>|=~?|[<>]=?|[+*/%^|]|\.\.\.?/,
|
|
9060
|
+
punctuation: /[()[\]{},;.]/
|
|
9061
|
+
};
|
|
9054
9062
|
}
|
|
9055
9063
|
|
|
9056
9064
|
var d_1 = d;
|
|
@@ -9139,97 +9147,88 @@ function d(Prism) {
|
|
|
9139
9147
|
});
|
|
9140
9148
|
}
|
|
9141
9149
|
|
|
9142
|
-
var dart_1;
|
|
9143
|
-
|
|
9144
|
-
|
|
9145
|
-
function
|
|
9146
|
-
if (hasRequiredDart) return dart_1;
|
|
9147
|
-
hasRequiredDart = 1;
|
|
9148
|
-
|
|
9149
|
-
dart_1 = dart;
|
|
9150
|
-
dart.displayName = 'dart';
|
|
9151
|
-
dart.aliases = [];
|
|
9152
|
-
function dart(Prism) {
|
|
9150
|
+
var dart_1 = dart;
|
|
9151
|
+
dart.displayName = 'dart';
|
|
9152
|
+
dart.aliases = [];
|
|
9153
|
+
function dart(Prism) {
|
|
9153
9154
|
(function (Prism) {
|
|
9154
|
-
|
|
9155
|
-
|
|
9156
|
-
|
|
9157
|
-
|
|
9158
|
-
|
|
9159
|
-
|
|
9160
|
-
|
|
9161
|
-
|
|
9162
|
-
|
|
9163
|
-
|
|
9164
|
-
|
|
9165
|
-
|
|
9166
|
-
|
|
9167
|
-
|
|
9168
|
-
|
|
9169
|
-
|
|
9170
|
-
|
|
9171
|
-
|
|
9172
|
-
|
|
9173
|
-
|
|
9174
|
-
|
|
9175
|
-
|
|
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
|
-
return dart_1;
|
|
9155
|
+
var keywords = [
|
|
9156
|
+
/\b(?:async|sync|yield)\*/,
|
|
9157
|
+
/\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/
|
|
9158
|
+
]; // Handles named imports, such as http.Client
|
|
9159
|
+
var packagePrefix = /(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/
|
|
9160
|
+
.source; // based on the dart naming conventions
|
|
9161
|
+
var className = {
|
|
9162
|
+
pattern: RegExp(packagePrefix + /[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),
|
|
9163
|
+
lookbehind: true,
|
|
9164
|
+
inside: {
|
|
9165
|
+
namespace: {
|
|
9166
|
+
pattern: /^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,
|
|
9167
|
+
inside: {
|
|
9168
|
+
punctuation: /\./
|
|
9169
|
+
}
|
|
9170
|
+
}
|
|
9171
|
+
}
|
|
9172
|
+
};
|
|
9173
|
+
Prism.languages.dart = Prism.languages.extend('clike', {
|
|
9174
|
+
'class-name': [
|
|
9175
|
+
className,
|
|
9176
|
+
{
|
|
9177
|
+
// variables and parameters
|
|
9178
|
+
// this to support class names (or generic parameters) which do not contain a lower case letter (also works for methods)
|
|
9179
|
+
pattern: RegExp(
|
|
9180
|
+
packagePrefix + /[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source
|
|
9181
|
+
),
|
|
9182
|
+
lookbehind: true,
|
|
9183
|
+
inside: className.inside
|
|
9184
|
+
}
|
|
9185
|
+
],
|
|
9186
|
+
keyword: keywords,
|
|
9187
|
+
operator:
|
|
9188
|
+
/\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/
|
|
9189
|
+
});
|
|
9190
|
+
Prism.languages.insertBefore('dart', 'string', {
|
|
9191
|
+
'string-literal': {
|
|
9192
|
+
pattern:
|
|
9193
|
+
/r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,
|
|
9194
|
+
greedy: true,
|
|
9195
|
+
inside: {
|
|
9196
|
+
interpolation: {
|
|
9197
|
+
pattern:
|
|
9198
|
+
/((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,
|
|
9199
|
+
lookbehind: true,
|
|
9200
|
+
inside: {
|
|
9201
|
+
punctuation: /^\$\{?|\}$/,
|
|
9202
|
+
expression: {
|
|
9203
|
+
pattern: /[\s\S]+/,
|
|
9204
|
+
inside: Prism.languages.dart
|
|
9205
|
+
}
|
|
9206
|
+
}
|
|
9207
|
+
},
|
|
9208
|
+
string: /[\s\S]+/
|
|
9209
|
+
}
|
|
9210
|
+
},
|
|
9211
|
+
string: undefined
|
|
9212
|
+
});
|
|
9213
|
+
Prism.languages.insertBefore('dart', 'class-name', {
|
|
9214
|
+
metadata: {
|
|
9215
|
+
pattern: /@\w+/,
|
|
9216
|
+
alias: 'function'
|
|
9217
|
+
}
|
|
9218
|
+
});
|
|
9219
|
+
Prism.languages.insertBefore('dart', 'class-name', {
|
|
9220
|
+
generics: {
|
|
9221
|
+
pattern:
|
|
9222
|
+
/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,
|
|
9223
|
+
inside: {
|
|
9224
|
+
'class-name': className,
|
|
9225
|
+
keyword: keywords,
|
|
9226
|
+
punctuation: /[<>(),.:]/,
|
|
9227
|
+
operator: /[?&|]/
|
|
9228
|
+
}
|
|
9229
|
+
}
|
|
9230
|
+
});
|
|
9231
|
+
})(Prism);
|
|
9233
9232
|
}
|
|
9234
9233
|
|
|
9235
9234
|
var dataweave_1 = dataweave;
|
|
@@ -9316,80 +9315,89 @@ function dax(Prism) {
|
|
|
9316
9315
|
};
|
|
9317
9316
|
}
|
|
9318
9317
|
|
|
9319
|
-
var dhall_1
|
|
9320
|
-
|
|
9321
|
-
|
|
9322
|
-
function
|
|
9323
|
-
|
|
9324
|
-
|
|
9325
|
-
|
|
9326
|
-
|
|
9327
|
-
|
|
9328
|
-
|
|
9329
|
-
|
|
9330
|
-
|
|
9331
|
-
|
|
9332
|
-
|
|
9333
|
-
|
|
9334
|
-
|
|
9335
|
-
|
|
9336
|
-
|
|
9337
|
-
|
|
9338
|
-
|
|
9339
|
-
|
|
9340
|
-
|
|
9341
|
-
|
|
9342
|
-
|
|
9343
|
-
|
|
9344
|
-
|
|
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
|
-
|
|
9318
|
+
var dhall_1;
|
|
9319
|
+
var hasRequiredDhall;
|
|
9320
|
+
|
|
9321
|
+
function requireDhall () {
|
|
9322
|
+
if (hasRequiredDhall) return dhall_1;
|
|
9323
|
+
hasRequiredDhall = 1;
|
|
9324
|
+
|
|
9325
|
+
dhall_1 = dhall;
|
|
9326
|
+
dhall.displayName = 'dhall';
|
|
9327
|
+
dhall.aliases = [];
|
|
9328
|
+
function dhall(Prism) {
|
|
9329
|
+
// ABNF grammar:
|
|
9330
|
+
// https://github.com/dhall-lang/dhall-lang/blob/master/standard/dhall.abnf
|
|
9331
|
+
Prism.languages.dhall = {
|
|
9332
|
+
// Multi-line comments can be nested. E.g. {- foo {- bar -} -}
|
|
9333
|
+
// The multi-line pattern is essentially this:
|
|
9334
|
+
// \{-(?:[^-{]|-(?!\})|\{(?!-)|<SELF>)*-\}
|
|
9335
|
+
comment:
|
|
9336
|
+
/--.*|\{-(?:[^-{]|-(?!\})|\{(?!-)|\{-(?:[^-{]|-(?!\})|\{(?!-))*-\})*-\}/,
|
|
9337
|
+
string: {
|
|
9338
|
+
pattern: /"(?:[^"\\]|\\.)*"|''(?:[^']|'(?!')|'''|''\$\{)*''(?!'|\$)/,
|
|
9339
|
+
greedy: true,
|
|
9340
|
+
inside: {
|
|
9341
|
+
interpolation: {
|
|
9342
|
+
pattern: /\$\{[^{}]*\}/,
|
|
9343
|
+
inside: {
|
|
9344
|
+
expression: {
|
|
9345
|
+
pattern: /(^\$\{)[\s\S]+(?=\}$)/,
|
|
9346
|
+
lookbehind: true,
|
|
9347
|
+
alias: 'language-dhall',
|
|
9348
|
+
inside: null // see blow
|
|
9349
|
+
},
|
|
9350
|
+
punctuation: /\$\{|\}/
|
|
9351
|
+
}
|
|
9352
|
+
}
|
|
9353
|
+
}
|
|
9354
|
+
},
|
|
9355
|
+
label: {
|
|
9356
|
+
pattern: /`[^`]*`/,
|
|
9357
|
+
greedy: true
|
|
9358
|
+
},
|
|
9359
|
+
url: {
|
|
9360
|
+
// https://github.com/dhall-lang/dhall-lang/blob/5fde8ef1bead6fb4e999d3c1ffe7044cd019d63a/standard/dhall.abnf#L596
|
|
9361
|
+
pattern:
|
|
9362
|
+
/\bhttps?:\/\/[\w.:%!$&'*+;=@~-]+(?:\/[\w.:%!$&'*+;=@~-]*)*(?:\?[/?\w.:%!$&'*+;=@~-]*)?/,
|
|
9363
|
+
greedy: true
|
|
9364
|
+
},
|
|
9365
|
+
env: {
|
|
9366
|
+
// https://github.com/dhall-lang/dhall-lang/blob/5fde8ef1bead6fb4e999d3c1ffe7044cd019d63a/standard/dhall.abnf#L661
|
|
9367
|
+
pattern: /\benv:(?:(?!\d)\w+|"(?:[^"\\=]|\\.)*")/,
|
|
9368
|
+
greedy: true,
|
|
9369
|
+
inside: {
|
|
9370
|
+
function: /^env/,
|
|
9371
|
+
operator: /^:/,
|
|
9372
|
+
variable: /[\s\S]+/
|
|
9373
|
+
}
|
|
9374
|
+
},
|
|
9375
|
+
hash: {
|
|
9376
|
+
// https://github.com/dhall-lang/dhall-lang/blob/5fde8ef1bead6fb4e999d3c1ffe7044cd019d63a/standard/dhall.abnf#L725
|
|
9377
|
+
pattern: /\bsha256:[\da-fA-F]{64}\b/,
|
|
9378
|
+
inside: {
|
|
9379
|
+
function: /sha256/,
|
|
9380
|
+
operator: /:/,
|
|
9381
|
+
number: /[\da-fA-F]{64}/
|
|
9382
|
+
}
|
|
9383
|
+
},
|
|
9384
|
+
// https://github.com/dhall-lang/dhall-lang/blob/5fde8ef1bead6fb4e999d3c1ffe7044cd019d63a/standard/dhall.abnf#L359
|
|
9385
|
+
keyword:
|
|
9386
|
+
/\b(?:as|assert|else|forall|if|in|let|merge|missing|then|toMap|using|with)\b|\u2200/,
|
|
9387
|
+
builtin: /\b(?:None|Some)\b/,
|
|
9388
|
+
boolean: /\b(?:False|True)\b/,
|
|
9389
|
+
number:
|
|
9390
|
+
/\bNaN\b|-?\bInfinity\b|[+-]?\b(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/,
|
|
9391
|
+
operator:
|
|
9392
|
+
/\/\\|\/\/\\\\|&&|\|\||===|[!=]=|\/\/|->|\+\+|::|[+*#@=:?<>|\\\u2227\u2a53\u2261\u2afd\u03bb\u2192]/,
|
|
9393
|
+
punctuation: /\.\.|[{}\[\](),./]/,
|
|
9394
|
+
// we'll just assume that every capital word left is a type name
|
|
9395
|
+
'class-name': /\b[A-Z]\w*\b/
|
|
9396
|
+
};
|
|
9397
|
+
Prism.languages.dhall.string.inside.interpolation.inside.expression.inside =
|
|
9398
|
+
Prism.languages.dhall;
|
|
9399
|
+
}
|
|
9400
|
+
return dhall_1;
|
|
9393
9401
|
}
|
|
9394
9402
|
|
|
9395
9403
|
var diff_1 = diff;
|
|
@@ -9582,73 +9590,65 @@ function requireMarkupTemplating () {
|
|
|
9582
9590
|
return markupTemplating_1;
|
|
9583
9591
|
}
|
|
9584
9592
|
|
|
9585
|
-
var
|
|
9586
|
-
var
|
|
9587
|
-
|
|
9588
|
-
|
|
9589
|
-
|
|
9590
|
-
|
|
9591
|
-
|
|
9592
|
-
|
|
9593
|
-
|
|
9594
|
-
|
|
9595
|
-
|
|
9596
|
-
|
|
9597
|
-
|
|
9598
|
-
|
|
9599
|
-
|
|
9600
|
-
|
|
9601
|
-
|
|
9602
|
-
|
|
9603
|
-
|
|
9604
|
-
|
|
9605
|
-
|
|
9606
|
-
|
|
9607
|
-
|
|
9608
|
-
|
|
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
|
-
markupTemplating.buildPlaceholders(env, 'jinja2', pattern);
|
|
9645
|
-
});
|
|
9646
|
-
Prism.hooks.add('after-tokenize', function (env) {
|
|
9647
|
-
markupTemplating.tokenizePlaceholders(env, 'jinja2');
|
|
9648
|
-
});
|
|
9649
|
-
})(Prism);
|
|
9650
|
-
}
|
|
9651
|
-
return django_1;
|
|
9593
|
+
var refractorMarkupTemplating$1 = requireMarkupTemplating();
|
|
9594
|
+
var django_1 = django;
|
|
9595
|
+
django.displayName = 'django';
|
|
9596
|
+
django.aliases = ['jinja2'];
|
|
9597
|
+
function django(Prism) {
|
|
9598
|
+
Prism.register(refractorMarkupTemplating$1)
|
|
9599
|
+
// Django/Jinja2 syntax definition for Prism.js <http://prismjs.com> syntax highlighter.
|
|
9600
|
+
// Mostly it works OK but can paint code incorrectly on complex html/template tag combinations.
|
|
9601
|
+
;(function (Prism) {
|
|
9602
|
+
Prism.languages.django = {
|
|
9603
|
+
comment: /^\{#[\s\S]*?#\}$/,
|
|
9604
|
+
tag: {
|
|
9605
|
+
pattern: /(^\{%[+-]?\s*)\w+/,
|
|
9606
|
+
lookbehind: true,
|
|
9607
|
+
alias: 'keyword'
|
|
9608
|
+
},
|
|
9609
|
+
delimiter: {
|
|
9610
|
+
pattern: /^\{[{%][+-]?|[+-]?[}%]\}$/,
|
|
9611
|
+
alias: 'punctuation'
|
|
9612
|
+
},
|
|
9613
|
+
string: {
|
|
9614
|
+
pattern: /("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
|
|
9615
|
+
greedy: true
|
|
9616
|
+
},
|
|
9617
|
+
filter: {
|
|
9618
|
+
pattern: /(\|)\w+/,
|
|
9619
|
+
lookbehind: true,
|
|
9620
|
+
alias: 'function'
|
|
9621
|
+
},
|
|
9622
|
+
test: {
|
|
9623
|
+
pattern: /(\bis\s+(?:not\s+)?)(?!not\b)\w+/,
|
|
9624
|
+
lookbehind: true,
|
|
9625
|
+
alias: 'function'
|
|
9626
|
+
},
|
|
9627
|
+
function: /\b[a-z_]\w+(?=\s*\()/i,
|
|
9628
|
+
keyword:
|
|
9629
|
+
/\b(?:and|as|by|else|for|if|import|in|is|loop|not|or|recursive|with|without)\b/,
|
|
9630
|
+
operator: /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,
|
|
9631
|
+
number: /\b\d+(?:\.\d+)?\b/,
|
|
9632
|
+
boolean: /[Ff]alse|[Nn]one|[Tt]rue/,
|
|
9633
|
+
variable: /\b\w+\b/,
|
|
9634
|
+
punctuation: /[{}[\](),.:;]/
|
|
9635
|
+
};
|
|
9636
|
+
var pattern = /\{\{[\s\S]*?\}\}|\{%[\s\S]*?%\}|\{#[\s\S]*?#\}/g;
|
|
9637
|
+
var markupTemplating = Prism.languages['markup-templating'];
|
|
9638
|
+
Prism.hooks.add('before-tokenize', function (env) {
|
|
9639
|
+
markupTemplating.buildPlaceholders(env, 'django', pattern);
|
|
9640
|
+
});
|
|
9641
|
+
Prism.hooks.add('after-tokenize', function (env) {
|
|
9642
|
+
markupTemplating.tokenizePlaceholders(env, 'django');
|
|
9643
|
+
}); // Add an Jinja2 alias
|
|
9644
|
+
Prism.languages.jinja2 = Prism.languages.django;
|
|
9645
|
+
Prism.hooks.add('before-tokenize', function (env) {
|
|
9646
|
+
markupTemplating.buildPlaceholders(env, 'jinja2', pattern);
|
|
9647
|
+
});
|
|
9648
|
+
Prism.hooks.add('after-tokenize', function (env) {
|
|
9649
|
+
markupTemplating.tokenizePlaceholders(env, 'jinja2');
|
|
9650
|
+
});
|
|
9651
|
+
})(Prism);
|
|
9652
9652
|
}
|
|
9653
9653
|
|
|
9654
9654
|
var dnsZoneFile_1 = dnsZoneFile;
|
|
@@ -9930,37 +9930,46 @@ function requireEbnf () {
|
|
|
9930
9930
|
return ebnf_1;
|
|
9931
9931
|
}
|
|
9932
9932
|
|
|
9933
|
-
var editorconfig_1
|
|
9934
|
-
|
|
9935
|
-
|
|
9936
|
-
function
|
|
9937
|
-
|
|
9938
|
-
|
|
9939
|
-
|
|
9940
|
-
|
|
9941
|
-
|
|
9942
|
-
|
|
9943
|
-
|
|
9944
|
-
|
|
9945
|
-
|
|
9946
|
-
|
|
9947
|
-
|
|
9948
|
-
|
|
9949
|
-
|
|
9950
|
-
|
|
9951
|
-
|
|
9952
|
-
|
|
9953
|
-
|
|
9954
|
-
|
|
9955
|
-
|
|
9956
|
-
|
|
9957
|
-
|
|
9958
|
-
|
|
9959
|
-
|
|
9960
|
-
|
|
9961
|
-
|
|
9962
|
-
|
|
9963
|
-
|
|
9933
|
+
var editorconfig_1;
|
|
9934
|
+
var hasRequiredEditorconfig;
|
|
9935
|
+
|
|
9936
|
+
function requireEditorconfig () {
|
|
9937
|
+
if (hasRequiredEditorconfig) return editorconfig_1;
|
|
9938
|
+
hasRequiredEditorconfig = 1;
|
|
9939
|
+
|
|
9940
|
+
editorconfig_1 = editorconfig;
|
|
9941
|
+
editorconfig.displayName = 'editorconfig';
|
|
9942
|
+
editorconfig.aliases = [];
|
|
9943
|
+
function editorconfig(Prism) {
|
|
9944
|
+
Prism.languages.editorconfig = {
|
|
9945
|
+
// https://editorconfig-specification.readthedocs.io
|
|
9946
|
+
comment: /[;#].*/,
|
|
9947
|
+
section: {
|
|
9948
|
+
pattern: /(^[ \t]*)\[.+\]/m,
|
|
9949
|
+
lookbehind: true,
|
|
9950
|
+
alias: 'selector',
|
|
9951
|
+
inside: {
|
|
9952
|
+
regex: /\\\\[\[\]{},!?.*]/,
|
|
9953
|
+
// Escape special characters with '\\'
|
|
9954
|
+
operator: /[!?]|\.\.|\*{1,2}/,
|
|
9955
|
+
punctuation: /[\[\]{},]/
|
|
9956
|
+
}
|
|
9957
|
+
},
|
|
9958
|
+
key: {
|
|
9959
|
+
pattern: /(^[ \t]*)[^\s=]+(?=[ \t]*=)/m,
|
|
9960
|
+
lookbehind: true,
|
|
9961
|
+
alias: 'attr-name'
|
|
9962
|
+
},
|
|
9963
|
+
value: {
|
|
9964
|
+
pattern: /=.*/,
|
|
9965
|
+
alias: 'attr-value',
|
|
9966
|
+
inside: {
|
|
9967
|
+
punctuation: /^=/
|
|
9968
|
+
}
|
|
9969
|
+
}
|
|
9970
|
+
};
|
|
9971
|
+
}
|
|
9972
|
+
return editorconfig_1;
|
|
9964
9973
|
}
|
|
9965
9974
|
|
|
9966
9975
|
var eiffel_1;
|
|
@@ -10010,45 +10019,37 @@ function requireEiffel () {
|
|
|
10010
10019
|
return eiffel_1;
|
|
10011
10020
|
}
|
|
10012
10021
|
|
|
10013
|
-
var
|
|
10014
|
-
var
|
|
10015
|
-
|
|
10016
|
-
|
|
10017
|
-
|
|
10018
|
-
|
|
10019
|
-
|
|
10020
|
-
|
|
10021
|
-
|
|
10022
|
-
|
|
10023
|
-
|
|
10024
|
-
|
|
10025
|
-
|
|
10026
|
-
|
|
10027
|
-
|
|
10028
|
-
|
|
10029
|
-
|
|
10030
|
-
|
|
10031
|
-
|
|
10032
|
-
|
|
10033
|
-
|
|
10034
|
-
|
|
10035
|
-
|
|
10036
|
-
|
|
10037
|
-
|
|
10038
|
-
|
|
10039
|
-
|
|
10040
|
-
|
|
10041
|
-
|
|
10042
|
-
|
|
10043
|
-
|
|
10044
|
-
});
|
|
10045
|
-
Prism.hooks.add('after-tokenize', function (env) {
|
|
10046
|
-
Prism.languages['markup-templating'].tokenizePlaceholders(env, 'ejs');
|
|
10047
|
-
});
|
|
10048
|
-
Prism.languages.eta = Prism.languages.ejs;
|
|
10049
|
-
})(Prism);
|
|
10050
|
-
}
|
|
10051
|
-
return ejs_1;
|
|
10022
|
+
var refractorMarkupTemplating = requireMarkupTemplating();
|
|
10023
|
+
var ejs_1 = ejs;
|
|
10024
|
+
ejs.displayName = 'ejs';
|
|
10025
|
+
ejs.aliases = ['eta'];
|
|
10026
|
+
function ejs(Prism) {
|
|
10027
|
+
Prism.register(refractorMarkupTemplating)
|
|
10028
|
+
;(function (Prism) {
|
|
10029
|
+
Prism.languages.ejs = {
|
|
10030
|
+
delimiter: {
|
|
10031
|
+
pattern: /^<%[-_=]?|[-_]?%>$/,
|
|
10032
|
+
alias: 'punctuation'
|
|
10033
|
+
},
|
|
10034
|
+
comment: /^#[\s\S]*/,
|
|
10035
|
+
'language-javascript': {
|
|
10036
|
+
pattern: /[\s\S]+/,
|
|
10037
|
+
inside: Prism.languages.javascript
|
|
10038
|
+
}
|
|
10039
|
+
};
|
|
10040
|
+
Prism.hooks.add('before-tokenize', function (env) {
|
|
10041
|
+
var ejsPattern = /<%(?!%)[\s\S]+?%>/g;
|
|
10042
|
+
Prism.languages['markup-templating'].buildPlaceholders(
|
|
10043
|
+
env,
|
|
10044
|
+
'ejs',
|
|
10045
|
+
ejsPattern
|
|
10046
|
+
);
|
|
10047
|
+
});
|
|
10048
|
+
Prism.hooks.add('after-tokenize', function (env) {
|
|
10049
|
+
Prism.languages['markup-templating'].tokenizePlaceholders(env, 'ejs');
|
|
10050
|
+
});
|
|
10051
|
+
Prism.languages.eta = Prism.languages.ejs;
|
|
10052
|
+
})(Prism);
|
|
10052
10053
|
}
|
|
10053
10054
|
|
|
10054
10055
|
var elixir_1;
|
|
@@ -27936,28 +27937,28 @@ refractor.register(cobol_1);
|
|
|
27936
27937
|
refractor.register(coffeescript_1);
|
|
27937
27938
|
refractor.register(concurnas_1);
|
|
27938
27939
|
refractor.register(coq_1);
|
|
27939
|
-
refractor.register(
|
|
27940
|
+
refractor.register(requireCpp());
|
|
27940
27941
|
refractor.register(crystal_1);
|
|
27941
27942
|
refractor.register(csharp_1);
|
|
27942
27943
|
refractor.register(cshtml_1);
|
|
27943
27944
|
refractor.register(csp_1);
|
|
27944
27945
|
refractor.register(cssExtras_1);
|
|
27945
|
-
refractor.register(
|
|
27946
|
-
refractor.register(
|
|
27946
|
+
refractor.register(requireCsv());
|
|
27947
|
+
refractor.register(cypher_1);
|
|
27947
27948
|
refractor.register(d_1);
|
|
27948
|
-
refractor.register(
|
|
27949
|
+
refractor.register(dart_1);
|
|
27949
27950
|
refractor.register(dataweave_1);
|
|
27950
27951
|
refractor.register(dax_1);
|
|
27951
|
-
refractor.register(
|
|
27952
|
+
refractor.register(requireDhall());
|
|
27952
27953
|
refractor.register(diff_1);
|
|
27953
|
-
refractor.register(
|
|
27954
|
+
refractor.register(django_1);
|
|
27954
27955
|
refractor.register(dnsZoneFile_1);
|
|
27955
27956
|
refractor.register(docker_1);
|
|
27956
27957
|
refractor.register(dot_1);
|
|
27957
27958
|
refractor.register(requireEbnf());
|
|
27958
|
-
refractor.register(
|
|
27959
|
+
refractor.register(requireEditorconfig());
|
|
27959
27960
|
refractor.register(requireEiffel());
|
|
27960
|
-
refractor.register(
|
|
27961
|
+
refractor.register(ejs_1);
|
|
27961
27962
|
refractor.register(requireElixir());
|
|
27962
27963
|
refractor.register(requireElm());
|
|
27963
27964
|
refractor.register(requireErb());
|
|
@@ -38934,6 +38935,18 @@ function escapeContentForStream(content) {
|
|
|
38934
38935
|
}
|
|
38935
38936
|
|
|
38936
38937
|
var renderTimer = null;
|
|
38938
|
+
/**
|
|
38939
|
+
* 预处理 MDX 内容,转义可能被误认为 HTML 标签的内容
|
|
38940
|
+
* @param content MDX 内容
|
|
38941
|
+
* @returns 处理后的内容
|
|
38942
|
+
*/
|
|
38943
|
+
function preprocessMdxContent(content) {
|
|
38944
|
+
// 匹配可能被误认为 HTML 标签的模式,如 <数字、<字母但不是真正的组件标签
|
|
38945
|
+
// 真正的 React 组件标签应该以大写字母开头,如 <Component>
|
|
38946
|
+
// HTML 标签以小写字母开头,如 <div>
|
|
38947
|
+
// 需要排除正常的闭合标签 </Component>
|
|
38948
|
+
return content.replace(/<(?!\/|[A-Z][a-zA-Z]*\b|[a-z][a-zA-Z0-9]*\b)/g, '<');
|
|
38949
|
+
}
|
|
38937
38950
|
// 辅助函数:格式化props
|
|
38938
38951
|
function formatProps(props) {
|
|
38939
38952
|
return Object.entries(props).map(function (_a) {
|
|
@@ -38953,7 +38966,7 @@ function formatProps(props) {
|
|
|
38953
38966
|
}
|
|
38954
38967
|
function renderMdx(mdxContent, scope, registeredComponents) {
|
|
38955
38968
|
return __awaiter(this, void 0, void 0, function () {
|
|
38956
|
-
var componentTagRegex, usedComponents, match, vf, XComponent;
|
|
38969
|
+
var componentTagRegex, usedComponents, match, processedContent, vf, XComponent, e_1;
|
|
38957
38970
|
return __generator(this, function (_a) {
|
|
38958
38971
|
switch (_a.label) {
|
|
38959
38972
|
case 0:
|
|
@@ -38965,7 +38978,8 @@ function renderMdx(mdxContent, scope, registeredComponents) {
|
|
|
38965
38978
|
while ((match = componentTagRegex.exec(mdxContent)) !== null) {
|
|
38966
38979
|
usedComponents.add(match[1]);
|
|
38967
38980
|
}
|
|
38968
|
-
|
|
38981
|
+
processedContent = preprocessMdxContent(mdxContent);
|
|
38982
|
+
return [4 /*yield*/, compile(processedContent, {
|
|
38969
38983
|
outputFormat: "function-body",
|
|
38970
38984
|
remarkPlugins: [[RemarkMath, {
|
|
38971
38985
|
strict: true
|
|
@@ -38988,7 +39002,8 @@ function renderMdx(mdxContent, scope, registeredComponents) {
|
|
|
38988
39002
|
scope: scope
|
|
38989
39003
|
})];
|
|
38990
39004
|
case 3:
|
|
38991
|
-
_a.sent();
|
|
39005
|
+
e_1 = _a.sent();
|
|
39006
|
+
console.log(e_1, 'e');
|
|
38992
39007
|
return [2 /*return*/, new Promise(function (resolve) {
|
|
38993
39008
|
renderTimer = setTimeout(function () {
|
|
38994
39009
|
resolve(/*#__PURE__*/React.createElement('div', {
|