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 CHANGED
@@ -5775,126 +5775,134 @@ function c(Prism) {
5775
5775
  delete Prism.languages.c['boolean'];
5776
5776
  }
5777
5777
 
5778
- var refractorC$1 = c_1;
5779
- var cpp_1 = cpp;
5780
- cpp.displayName = 'cpp';
5781
- cpp.aliases = [];
5782
- function cpp(Prism) {
5783
- Prism.register(refractorC$1)
5784
- ;(function (Prism) {
5785
- var keyword =
5786
- /\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/;
5787
- var modName = /\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(
5788
- /<keyword>/g,
5789
- function () {
5790
- return keyword.source
5791
- }
5792
- );
5793
- Prism.languages.cpp = Prism.languages.extend('c', {
5794
- 'class-name': [
5795
- {
5796
- pattern: RegExp(
5797
- /(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(
5798
- /<keyword>/g,
5799
- function () {
5800
- return keyword.source
5801
- }
5802
- )
5803
- ),
5804
- lookbehind: true
5805
- }, // This is intended to capture the class name of method implementations like:
5806
- // void foo::bar() const {}
5807
- // However! The `foo` in the above example could also be a namespace, so we only capture the class name if
5808
- // it starts with an uppercase letter. This approximation should give decent results.
5809
- /\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/, // This will capture the class name before destructors like:
5810
- // Foo::~Foo() {}
5811
- /\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
5812
- // parameters, so it can't be a namespace (until C++ adds generic namespaces).
5813
- /\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/
5814
- ],
5815
- keyword: keyword,
5816
- number: {
5817
- pattern:
5818
- /(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,
5819
- greedy: true
5820
- },
5821
- operator:
5822
- />>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,
5823
- boolean: /\b(?:false|true)\b/
5824
- });
5825
- Prism.languages.insertBefore('cpp', 'string', {
5826
- module: {
5827
- // https://en.cppreference.com/w/cpp/language/modules
5828
- pattern: RegExp(
5829
- /(\b(?:import|module)\s+)/.source +
5830
- '(?:' + // header-name
5831
- /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source +
5832
- '|' + // module name or partition or both
5833
- /<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(
5834
- /<mod-name>/g,
5835
- function () {
5836
- return modName
5837
- }
5838
- ) +
5839
- ')'
5840
- ),
5841
- lookbehind: true,
5842
- greedy: true,
5843
- inside: {
5844
- string: /^[<"][\s\S]+/,
5845
- operator: /:/,
5846
- punctuation: /\./
5847
- }
5848
- },
5849
- 'raw-string': {
5850
- pattern: /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,
5851
- alias: 'string',
5852
- greedy: true
5853
- }
5854
- });
5855
- Prism.languages.insertBefore('cpp', 'keyword', {
5856
- 'generic-function': {
5857
- pattern: /\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,
5858
- inside: {
5859
- function: /^\w+/,
5860
- generic: {
5861
- pattern: /<[\s\S]+/,
5862
- alias: 'class-name',
5863
- inside: Prism.languages.cpp
5864
- }
5865
- }
5866
- }
5867
- });
5868
- Prism.languages.insertBefore('cpp', 'operator', {
5869
- 'double-colon': {
5870
- pattern: /::/,
5871
- alias: 'punctuation'
5872
- }
5873
- });
5874
- Prism.languages.insertBefore('cpp', 'class-name', {
5875
- // the base clause is an optional list of parent classes
5876
- // https://en.cppreference.com/w/cpp/language/class
5877
- 'base-clause': {
5878
- pattern:
5879
- /(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,
5880
- lookbehind: true,
5881
- greedy: true,
5882
- inside: Prism.languages.extend('cpp', {})
5883
- }
5884
- });
5885
- Prism.languages.insertBefore(
5886
- 'inside',
5887
- 'double-colon',
5888
- {
5889
- // All untokenized words that are not namespaces should be class names
5890
- 'class-name': /\b[a-z_]\w*\b(?!\s*::)/i
5891
- },
5892
- Prism.languages.cpp['base-clause']
5893
- );
5894
- })(Prism);
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 = cpp_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 = cpp_1;
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 = csv;
9019
- csv.displayName = 'csv';
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
- var cypher_1;
9030
- var hasRequiredCypher;
9029
+ function requireCsv () {
9030
+ if (hasRequiredCsv) return csv_1;
9031
+ hasRequiredCsv = 1;
9031
9032
 
9032
- function requireCypher () {
9033
- if (hasRequiredCypher) return cypher_1;
9034
- hasRequiredCypher = 1;
9035
-
9036
- cypher_1 = cypher;
9037
- cypher.displayName = 'cypher';
9038
- cypher.aliases = [];
9039
- function cypher(Prism) {
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 cypher_1;
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
- var hasRequiredDart;
9166
-
9167
- function requireDart () {
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
- var keywords = [
9177
- /\b(?:async|sync|yield)\*/,
9178
- /\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/
9179
- ]; // Handles named imports, such as http.Client
9180
- var packagePrefix = /(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/
9181
- .source; // based on the dart naming conventions
9182
- var className = {
9183
- pattern: RegExp(packagePrefix + /[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),
9184
- lookbehind: true,
9185
- inside: {
9186
- namespace: {
9187
- pattern: /^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,
9188
- inside: {
9189
- punctuation: /\./
9190
- }
9191
- }
9192
- }
9193
- };
9194
- Prism.languages.dart = Prism.languages.extend('clike', {
9195
- 'class-name': [
9196
- className,
9197
- {
9198
- // variables and parameters
9199
- // this to support class names (or generic parameters) which do not contain a lower case letter (also works for methods)
9200
- pattern: RegExp(
9201
- packagePrefix + /[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source
9202
- ),
9203
- lookbehind: true,
9204
- inside: className.inside
9205
- }
9206
- ],
9207
- keyword: keywords,
9208
- operator:
9209
- /\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/
9210
- });
9211
- Prism.languages.insertBefore('dart', 'string', {
9212
- 'string-literal': {
9213
- pattern:
9214
- /r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,
9215
- greedy: true,
9216
- inside: {
9217
- interpolation: {
9218
- pattern:
9219
- /((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,
9220
- lookbehind: true,
9221
- inside: {
9222
- punctuation: /^\$\{?|\}$/,
9223
- expression: {
9224
- pattern: /[\s\S]+/,
9225
- inside: Prism.languages.dart
9226
- }
9227
- }
9228
- },
9229
- string: /[\s\S]+/
9230
- }
9231
- },
9232
- string: undefined
9233
- });
9234
- Prism.languages.insertBefore('dart', 'class-name', {
9235
- metadata: {
9236
- pattern: /@\w+/,
9237
- alias: 'function'
9238
- }
9239
- });
9240
- Prism.languages.insertBefore('dart', 'class-name', {
9241
- generics: {
9242
- pattern:
9243
- /<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,
9244
- inside: {
9245
- 'class-name': className,
9246
- keyword: keywords,
9247
- punctuation: /[<>(),.:]/,
9248
- operator: /[?&|]/
9249
- }
9250
- }
9251
- });
9252
- })(Prism);
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 = dhall;
9342
- dhall.displayName = 'dhall';
9343
- dhall.aliases = [];
9344
- function dhall(Prism) {
9345
- // ABNF grammar:
9346
- // https://github.com/dhall-lang/dhall-lang/blob/master/standard/dhall.abnf
9347
- Prism.languages.dhall = {
9348
- // Multi-line comments can be nested. E.g. {- foo {- bar -} -}
9349
- // The multi-line pattern is essentially this:
9350
- // \{-(?:[^-{]|-(?!\})|\{(?!-)|<SELF>)*-\}
9351
- comment:
9352
- /--.*|\{-(?:[^-{]|-(?!\})|\{(?!-)|\{-(?:[^-{]|-(?!\})|\{(?!-))*-\})*-\}/,
9353
- string: {
9354
- pattern: /"(?:[^"\\]|\\.)*"|''(?:[^']|'(?!')|'''|''\$\{)*''(?!'|\$)/,
9355
- greedy: true,
9356
- inside: {
9357
- interpolation: {
9358
- pattern: /\$\{[^{}]*\}/,
9359
- inside: {
9360
- expression: {
9361
- pattern: /(^\$\{)[\s\S]+(?=\}$)/,
9362
- lookbehind: true,
9363
- alias: 'language-dhall',
9364
- inside: null // see blow
9365
- },
9366
- punctuation: /\$\{|\}/
9367
- }
9368
- }
9369
- }
9370
- },
9371
- label: {
9372
- pattern: /`[^`]*`/,
9373
- greedy: true
9374
- },
9375
- url: {
9376
- // https://github.com/dhall-lang/dhall-lang/blob/5fde8ef1bead6fb4e999d3c1ffe7044cd019d63a/standard/dhall.abnf#L596
9377
- pattern:
9378
- /\bhttps?:\/\/[\w.:%!$&'*+;=@~-]+(?:\/[\w.:%!$&'*+;=@~-]*)*(?:\?[/?\w.:%!$&'*+;=@~-]*)?/,
9379
- greedy: true
9380
- },
9381
- env: {
9382
- // https://github.com/dhall-lang/dhall-lang/blob/5fde8ef1bead6fb4e999d3c1ffe7044cd019d63a/standard/dhall.abnf#L661
9383
- pattern: /\benv:(?:(?!\d)\w+|"(?:[^"\\=]|\\.)*")/,
9384
- greedy: true,
9385
- inside: {
9386
- function: /^env/,
9387
- operator: /^:/,
9388
- variable: /[\s\S]+/
9389
- }
9390
- },
9391
- hash: {
9392
- // https://github.com/dhall-lang/dhall-lang/blob/5fde8ef1bead6fb4e999d3c1ffe7044cd019d63a/standard/dhall.abnf#L725
9393
- pattern: /\bsha256:[\da-fA-F]{64}\b/,
9394
- inside: {
9395
- function: /sha256/,
9396
- operator: /:/,
9397
- number: /[\da-fA-F]{64}/
9398
- }
9399
- },
9400
- // https://github.com/dhall-lang/dhall-lang/blob/5fde8ef1bead6fb4e999d3c1ffe7044cd019d63a/standard/dhall.abnf#L359
9401
- keyword:
9402
- /\b(?:as|assert|else|forall|if|in|let|merge|missing|then|toMap|using|with)\b|\u2200/,
9403
- builtin: /\b(?:None|Some)\b/,
9404
- boolean: /\b(?:False|True)\b/,
9405
- number:
9406
- /\bNaN\b|-?\bInfinity\b|[+-]?\b(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/,
9407
- operator:
9408
- /\/\\|\/\/\\\\|&&|\|\||===|[!=]=|\/\/|->|\+\+|::|[+*#@=:?<>|\\\u2227\u2a53\u2261\u2afd\u03bb\u2192]/,
9409
- punctuation: /\.\.|[{}\[\](),./]/,
9410
- // we'll just assume that every capital word left is a type name
9411
- 'class-name': /\b[A-Z]\w*\b/
9412
- };
9413
- Prism.languages.dhall.string.inside.interpolation.inside.expression.inside =
9414
- Prism.languages.dhall;
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 django_1;
9608
- var hasRequiredDjango;
9609
-
9610
- function requireDjango () {
9611
- if (hasRequiredDjango) return django_1;
9612
- hasRequiredDjango = 1;
9613
- var refractorMarkupTemplating = requireMarkupTemplating();
9614
- django_1 = django;
9615
- django.displayName = 'django';
9616
- django.aliases = ['jinja2'];
9617
- function django(Prism) {
9618
- Prism.register(refractorMarkupTemplating)
9619
- // Django/Jinja2 syntax definition for Prism.js <http://prismjs.com> syntax highlighter.
9620
- // Mostly it works OK but can paint code incorrectly on complex html/template tag combinations.
9621
- ;(function (Prism) {
9622
- Prism.languages.django = {
9623
- comment: /^\{#[\s\S]*?#\}$/,
9624
- tag: {
9625
- pattern: /(^\{%[+-]?\s*)\w+/,
9626
- lookbehind: true,
9627
- alias: 'keyword'
9628
- },
9629
- delimiter: {
9630
- pattern: /^\{[{%][+-]?|[+-]?[}%]\}$/,
9631
- alias: 'punctuation'
9632
- },
9633
- string: {
9634
- pattern: /("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
9635
- greedy: true
9636
- },
9637
- filter: {
9638
- pattern: /(\|)\w+/,
9639
- lookbehind: true,
9640
- alias: 'function'
9641
- },
9642
- test: {
9643
- pattern: /(\bis\s+(?:not\s+)?)(?!not\b)\w+/,
9644
- lookbehind: true,
9645
- alias: 'function'
9646
- },
9647
- function: /\b[a-z_]\w+(?=\s*\()/i,
9648
- keyword:
9649
- /\b(?:and|as|by|else|for|if|import|in|is|loop|not|or|recursive|with|without)\b/,
9650
- operator: /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,
9651
- number: /\b\d+(?:\.\d+)?\b/,
9652
- boolean: /[Ff]alse|[Nn]one|[Tt]rue/,
9653
- variable: /\b\w+\b/,
9654
- punctuation: /[{}[\](),.:;]/
9655
- };
9656
- var pattern = /\{\{[\s\S]*?\}\}|\{%[\s\S]*?%\}|\{#[\s\S]*?#\}/g;
9657
- var markupTemplating = Prism.languages['markup-templating'];
9658
- Prism.hooks.add('before-tokenize', function (env) {
9659
- markupTemplating.buildPlaceholders(env, 'django', pattern);
9660
- });
9661
- Prism.hooks.add('after-tokenize', function (env) {
9662
- markupTemplating.tokenizePlaceholders(env, 'django');
9663
- }); // Add an Jinja2 alias
9664
- Prism.languages.jinja2 = Prism.languages.django;
9665
- Prism.hooks.add('before-tokenize', function (env) {
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 = editorconfig;
9956
- editorconfig.displayName = 'editorconfig';
9957
- editorconfig.aliases = [];
9958
- function editorconfig(Prism) {
9959
- Prism.languages.editorconfig = {
9960
- // https://editorconfig-specification.readthedocs.io
9961
- comment: /[;#].*/,
9962
- section: {
9963
- pattern: /(^[ \t]*)\[.+\]/m,
9964
- lookbehind: true,
9965
- alias: 'selector',
9966
- inside: {
9967
- regex: /\\\\[\[\]{},!?.*]/,
9968
- // Escape special characters with '\\'
9969
- operator: /[!?]|\.\.|\*{1,2}/,
9970
- punctuation: /[\[\]{},]/
9971
- }
9972
- },
9973
- key: {
9974
- pattern: /(^[ \t]*)[^\s=]+(?=[ \t]*=)/m,
9975
- lookbehind: true,
9976
- alias: 'attr-name'
9977
- },
9978
- value: {
9979
- pattern: /=.*/,
9980
- alias: 'attr-value',
9981
- inside: {
9982
- punctuation: /^=/
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 ejs_1;
10036
- var hasRequiredEjs;
10037
-
10038
- function requireEjs () {
10039
- if (hasRequiredEjs) return ejs_1;
10040
- hasRequiredEjs = 1;
10041
- var refractorMarkupTemplating = requireMarkupTemplating();
10042
- ejs_1 = ejs;
10043
- ejs.displayName = 'ejs';
10044
- ejs.aliases = ['eta'];
10045
- function ejs(Prism) {
10046
- Prism.register(refractorMarkupTemplating)
10047
- ;(function (Prism) {
10048
- Prism.languages.ejs = {
10049
- delimiter: {
10050
- pattern: /^<%[-_=]?|[-_]?%>$/,
10051
- alias: 'punctuation'
10052
- },
10053
- comment: /^#[\s\S]*/,
10054
- 'language-javascript': {
10055
- pattern: /[\s\S]+/,
10056
- inside: Prism.languages.javascript
10057
- }
10058
- };
10059
- Prism.hooks.add('before-tokenize', function (env) {
10060
- var ejsPattern = /<%(?!%)[\s\S]+?%>/g;
10061
- Prism.languages['markup-templating'].buildPlaceholders(
10062
- env,
10063
- 'ejs',
10064
- ejsPattern
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(cpp_1);
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(csv_1);
27968
- refractor.register(requireCypher());
27968
+ refractor.register(requireCsv());
27969
+ refractor.register(cypher_1);
27969
27970
  refractor.register(d_1);
27970
- refractor.register(requireDart());
27971
+ refractor.register(dart_1);
27971
27972
  refractor.register(dataweave_1);
27972
27973
  refractor.register(dax_1);
27973
- refractor.register(dhall_1);
27974
+ refractor.register(requireDhall());
27974
27975
  refractor.register(diff_1);
27975
- refractor.register(requireDjango());
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(editorconfig_1);
27981
+ refractor.register(requireEditorconfig());
27981
27982
  refractor.register(requireEiffel());
27982
- refractor.register(requireEjs());
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, '&lt;');
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
- return [4 /*yield*/, mdx.compile(mdxContent, {
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', {