@scalar/code-highlight 0.4.3 → 0.4.5
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/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/dist/chunks/code.js.map +1 -1
- package/dist/chunks/languages.js +611 -272
- package/dist/chunks/languages.js.map +1 -1
- package/dist/chunks/lib.js +98 -63
- package/dist/chunks/lib.js.map +1 -1
- package/dist/chunks/lib2.js +6 -1
- package/dist/chunks/lib2.js.map +1 -1
- package/dist/chunks/markdown.js +8 -6
- package/dist/chunks/markdown.js.map +1 -1
- package/dist/chunks/rehype-alert.js.map +1 -1
- package/dist/chunks/rehype-highlight.js +32 -7
- package/dist/chunks/rehype-highlight.js.map +1 -1
- package/dist/code/index.js +0 -1
- package/dist/index.js +0 -1
- package/dist/languages/standard.d.ts +1 -0
- package/dist/languages/standard.d.ts.map +1 -1
- package/dist/markdown/index.js +0 -1
- package/package.json +3 -3
package/dist/chunks/languages.js
CHANGED
|
@@ -5,7 +5,7 @@ function clojure(hljs) {
|
|
|
5
5
|
const globals = "def defonce defprotocol defstruct defmulti defmethod defn- defn defmacro deftype defrecord";
|
|
6
6
|
const keywords = {
|
|
7
7
|
$pattern: SYMBOL_RE,
|
|
8
|
-
built_in:
|
|
8
|
+
built_in: "def defonce defprotocol defstruct defmulti defmethod defn- defn defmacro deftype defrecord cond apply if-not if-let if not not= =|0 <|0 >|0 <=|0 >=|0 ==|0 +|0 /|0 *|0 -|0 rem quot neg? pos? delay? symbol? keyword? true? false? integer? empty? coll? list? set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? string? map? nil? contains? zero? instance? not-every? not-any? libspec? -> ->> .. . inc compare do dotimes mapcat take remove take-while drop letfn drop-last take-last drop-while while intern condp case reduced cycle split-at split-with repeat replicate iterate range merge zipmap declare line-seq sort comparator sort-by dorun doall nthnext nthrest partition eval doseq await await-for let agent atom send send-off release-pending-sends add-watch mapv filterv remove-watch agent-error restart-agent set-error-handler error-handler set-error-mode! error-mode shutdown-agents quote var fn loop recur throw try monitor-enter monitor-exit macroexpand macroexpand-1 for dosync and or when when-not when-let comp juxt partial sequence memoize constantly complement identity assert peek pop doto proxy first rest cons cast coll last butlast sigs reify second ffirst fnext nfirst nnext meta with-meta ns in-ns create-ns import refer keys select-keys vals key val rseq name namespace promise into transient persistent! conj! assoc! dissoc! pop! disj! use class type num float double short byte boolean bigint biginteger bigdec print-method print-dup throw-if printf format load compile get-in update-in pr pr-on newline flush read slurp read-line subvec with-open memfn time re-find re-groups rand-int rand mod locking assert-valid-fdecl alias resolve ref deref refset swap! reset! set-validator! compare-and-set! alter-meta! reset-meta! commute get-validator alter ref-set ref-history-count ref-min-history ref-max-history ensure sync io! new next conj set! to-array future future-call into-array aset gen-class reduce map filter find empty hash-map hash-set sorted-map sorted-map-by sorted-set sorted-set-by vec vector seq flatten reverse assoc dissoc list disj get union difference intersection extend extend-type extend-protocol int nth delay count concat chunk chunk-buffer chunk-append chunk-first chunk-rest max min dec unchecked-inc-int unchecked-inc unchecked-dec-inc unchecked-dec unchecked-negate unchecked-add-int unchecked-add unchecked-subtract-int unchecked-subtract chunk-next chunk-cons chunked-seq? prn vary-meta lazy-seq spread list* str find-keyword keyword symbol gensym force rationalize"
|
|
9
9
|
};
|
|
10
10
|
const SYMBOL = {
|
|
11
11
|
begin: SYMBOL_RE,
|
|
@@ -53,13 +53,13 @@ function clojure(hljs) {
|
|
|
53
53
|
begin: /\b(true|false|nil)\b/
|
|
54
54
|
};
|
|
55
55
|
const COLLECTION = {
|
|
56
|
-
begin: "\\[|(#::?
|
|
56
|
+
begin: "\\[|(#::?[#]?[a-zA-Z_\\-!.?+*=<>&'][a-zA-Z_\\-!.?+*=<>&'0-9/;:$#]*)?\\{",
|
|
57
57
|
end: "[\\]\\}]",
|
|
58
58
|
relevance: 0
|
|
59
59
|
};
|
|
60
60
|
const KEY = {
|
|
61
61
|
className: "symbol",
|
|
62
|
-
begin: "[:]{1,2}"
|
|
62
|
+
begin: "[:]{1,2}[#]?[a-zA-Z_\\-!.?+*=<>&'][a-zA-Z_\\-!.?+*=<>&'0-9/;:$#]*"
|
|
63
63
|
};
|
|
64
64
|
const LIST = {
|
|
65
65
|
begin: "\\(",
|
|
@@ -451,7 +451,6 @@ function elixir(hljs) {
|
|
|
451
451
|
scope: "char.escape",
|
|
452
452
|
relevance: 0
|
|
453
453
|
};
|
|
454
|
-
const SIGIL_DELIMITERS = "[/|([{<\"']";
|
|
455
454
|
const SIGIL_DELIMITER_MODES = [
|
|
456
455
|
{
|
|
457
456
|
begin: /"/,
|
|
@@ -495,7 +494,7 @@ function elixir(hljs) {
|
|
|
495
494
|
};
|
|
496
495
|
const LOWERCASE_SIGIL = {
|
|
497
496
|
className: "string",
|
|
498
|
-
begin: "~[a-z](?="
|
|
497
|
+
begin: "~[a-z](?=[/|([{<\"'])",
|
|
499
498
|
contains: SIGIL_DELIMITER_MODES.map((x) => hljs.inherit(x, { contains: [
|
|
500
499
|
escapeSigilEnd(x.end),
|
|
501
500
|
BACKSLASH_ESCAPE,
|
|
@@ -504,13 +503,13 @@ function elixir(hljs) {
|
|
|
504
503
|
};
|
|
505
504
|
const UPCASE_SIGIL = {
|
|
506
505
|
className: "string",
|
|
507
|
-
begin: "~[A-Z](?="
|
|
506
|
+
begin: "~[A-Z](?=[/|([{<\"'])",
|
|
508
507
|
contains: SIGIL_DELIMITER_MODES.map((x) => hljs.inherit(x, { contains: [escapeSigilEnd(x.end)] }))
|
|
509
508
|
};
|
|
510
509
|
const REGEX_SIGIL = {
|
|
511
510
|
className: "regex",
|
|
512
511
|
variants: [{
|
|
513
|
-
begin: "~r(?="
|
|
512
|
+
begin: "~r(?=[/|([{<\"'])",
|
|
514
513
|
contains: SIGIL_DELIMITER_MODES.map((x) => hljs.inherit(x, {
|
|
515
514
|
end: regex.concat(x.end, /[uismxfU]{0,7}/),
|
|
516
515
|
contains: [
|
|
@@ -520,7 +519,7 @@ function elixir(hljs) {
|
|
|
520
519
|
]
|
|
521
520
|
}))
|
|
522
521
|
}, {
|
|
523
|
-
begin: "~R(?="
|
|
522
|
+
begin: "~R(?=[/|([{<\"'])",
|
|
524
523
|
contains: SIGIL_DELIMITER_MODES.map((x) => hljs.inherit(x, {
|
|
525
524
|
end: regex.concat(x.end, /[uismxfU]{0,7}/),
|
|
526
525
|
contains: [escapeSigilEnd(x.end)]
|
|
@@ -600,7 +599,7 @@ function elixir(hljs) {
|
|
|
600
599
|
},
|
|
601
600
|
{
|
|
602
601
|
className: "symbol",
|
|
603
|
-
begin:
|
|
602
|
+
begin: "[a-zA-Z_][a-zA-Z0-9_.]*(!|\\?)?:(?!:)",
|
|
604
603
|
relevance: 0
|
|
605
604
|
},
|
|
606
605
|
{
|
|
@@ -1017,15 +1016,6 @@ function fsharp(hljs) {
|
|
|
1017
1016
|
GENERIC_TYPE_SYMBOL,
|
|
1018
1017
|
OPERATOR
|
|
1019
1018
|
];
|
|
1020
|
-
const STRING = { variants: [
|
|
1021
|
-
INTERPOLATED_TRIPLE_QUOTED_STRING,
|
|
1022
|
-
INTERPOLATED_VERBATIM_STRING,
|
|
1023
|
-
INTERPOLATED_STRING,
|
|
1024
|
-
TRIPLE_QUOTED_STRING,
|
|
1025
|
-
VERBATIM_STRING,
|
|
1026
|
-
QUOTED_STRING,
|
|
1027
|
-
CHAR_LITERAL
|
|
1028
|
-
] };
|
|
1029
1019
|
return {
|
|
1030
1020
|
name: "F#",
|
|
1031
1021
|
aliases: ["fs", "f#"],
|
|
@@ -1034,7 +1024,15 @@ function fsharp(hljs) {
|
|
|
1034
1024
|
classNameAliases: { "computation-expression": "keyword" },
|
|
1035
1025
|
contains: [
|
|
1036
1026
|
BANG_KEYWORD_MODE,
|
|
1037
|
-
|
|
1027
|
+
{ variants: [
|
|
1028
|
+
INTERPOLATED_TRIPLE_QUOTED_STRING,
|
|
1029
|
+
INTERPOLATED_VERBATIM_STRING,
|
|
1030
|
+
INTERPOLATED_STRING,
|
|
1031
|
+
TRIPLE_QUOTED_STRING,
|
|
1032
|
+
VERBATIM_STRING,
|
|
1033
|
+
QUOTED_STRING,
|
|
1034
|
+
CHAR_LITERAL
|
|
1035
|
+
] },
|
|
1038
1036
|
COMMENT,
|
|
1039
1037
|
QUOTED_IDENTIFIER,
|
|
1040
1038
|
TYPE_DECLARATION,
|
|
@@ -1241,7 +1239,7 @@ function http(hljs) {
|
|
|
1241
1239
|
illegal: /\S/,
|
|
1242
1240
|
contains: [
|
|
1243
1241
|
{
|
|
1244
|
-
begin: "^(?=
|
|
1242
|
+
begin: "^(?=HTTP/([32]|1\\.[01]) \\d{3})",
|
|
1245
1243
|
end: /$/,
|
|
1246
1244
|
contains: [{
|
|
1247
1245
|
className: "meta",
|
|
@@ -1257,7 +1255,7 @@ function http(hljs) {
|
|
|
1257
1255
|
}
|
|
1258
1256
|
},
|
|
1259
1257
|
{
|
|
1260
|
-
begin: "(?=^[A-Z]+ (.*?)
|
|
1258
|
+
begin: "(?=^[A-Z]+ (.*?) HTTP/([32]|1\\.[01])$)",
|
|
1261
1259
|
end: /$/,
|
|
1262
1260
|
contains: [
|
|
1263
1261
|
{
|
|
@@ -1287,12 +1285,362 @@ function http(hljs) {
|
|
|
1287
1285
|
};
|
|
1288
1286
|
}
|
|
1289
1287
|
//#endregion
|
|
1288
|
+
//#region ../../node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/julia.js
|
|
1289
|
+
function julia(hljs) {
|
|
1290
|
+
const KEYWORDS = {
|
|
1291
|
+
$pattern: "[A-Za-z_\\u00A1-\\uFFFF][A-Za-z_0-9\\u00A1-\\uFFFF]*",
|
|
1292
|
+
keyword: [
|
|
1293
|
+
"baremodule",
|
|
1294
|
+
"begin",
|
|
1295
|
+
"break",
|
|
1296
|
+
"catch",
|
|
1297
|
+
"ccall",
|
|
1298
|
+
"const",
|
|
1299
|
+
"continue",
|
|
1300
|
+
"do",
|
|
1301
|
+
"else",
|
|
1302
|
+
"elseif",
|
|
1303
|
+
"end",
|
|
1304
|
+
"export",
|
|
1305
|
+
"false",
|
|
1306
|
+
"finally",
|
|
1307
|
+
"for",
|
|
1308
|
+
"function",
|
|
1309
|
+
"global",
|
|
1310
|
+
"if",
|
|
1311
|
+
"import",
|
|
1312
|
+
"in",
|
|
1313
|
+
"isa",
|
|
1314
|
+
"let",
|
|
1315
|
+
"local",
|
|
1316
|
+
"macro",
|
|
1317
|
+
"module",
|
|
1318
|
+
"quote",
|
|
1319
|
+
"return",
|
|
1320
|
+
"true",
|
|
1321
|
+
"try",
|
|
1322
|
+
"using",
|
|
1323
|
+
"where",
|
|
1324
|
+
"while"
|
|
1325
|
+
],
|
|
1326
|
+
literal: [
|
|
1327
|
+
"ARGS",
|
|
1328
|
+
"C_NULL",
|
|
1329
|
+
"DEPOT_PATH",
|
|
1330
|
+
"ENDIAN_BOM",
|
|
1331
|
+
"ENV",
|
|
1332
|
+
"Inf",
|
|
1333
|
+
"Inf16",
|
|
1334
|
+
"Inf32",
|
|
1335
|
+
"Inf64",
|
|
1336
|
+
"InsertionSort",
|
|
1337
|
+
"LOAD_PATH",
|
|
1338
|
+
"MergeSort",
|
|
1339
|
+
"NaN",
|
|
1340
|
+
"NaN16",
|
|
1341
|
+
"NaN32",
|
|
1342
|
+
"NaN64",
|
|
1343
|
+
"PROGRAM_FILE",
|
|
1344
|
+
"QuickSort",
|
|
1345
|
+
"RoundDown",
|
|
1346
|
+
"RoundFromZero",
|
|
1347
|
+
"RoundNearest",
|
|
1348
|
+
"RoundNearestTiesAway",
|
|
1349
|
+
"RoundNearestTiesUp",
|
|
1350
|
+
"RoundToZero",
|
|
1351
|
+
"RoundUp",
|
|
1352
|
+
"VERSION|0",
|
|
1353
|
+
"devnull",
|
|
1354
|
+
"false",
|
|
1355
|
+
"im",
|
|
1356
|
+
"missing",
|
|
1357
|
+
"nothing",
|
|
1358
|
+
"pi",
|
|
1359
|
+
"stderr",
|
|
1360
|
+
"stdin",
|
|
1361
|
+
"stdout",
|
|
1362
|
+
"true",
|
|
1363
|
+
"undef",
|
|
1364
|
+
"π",
|
|
1365
|
+
"ℯ"
|
|
1366
|
+
],
|
|
1367
|
+
built_in: [
|
|
1368
|
+
"AbstractArray",
|
|
1369
|
+
"AbstractChannel",
|
|
1370
|
+
"AbstractChar",
|
|
1371
|
+
"AbstractDict",
|
|
1372
|
+
"AbstractDisplay",
|
|
1373
|
+
"AbstractFloat",
|
|
1374
|
+
"AbstractIrrational",
|
|
1375
|
+
"AbstractMatrix",
|
|
1376
|
+
"AbstractRange",
|
|
1377
|
+
"AbstractSet",
|
|
1378
|
+
"AbstractString",
|
|
1379
|
+
"AbstractUnitRange",
|
|
1380
|
+
"AbstractVecOrMat",
|
|
1381
|
+
"AbstractVector",
|
|
1382
|
+
"Any",
|
|
1383
|
+
"ArgumentError",
|
|
1384
|
+
"Array",
|
|
1385
|
+
"AssertionError",
|
|
1386
|
+
"BigFloat",
|
|
1387
|
+
"BigInt",
|
|
1388
|
+
"BitArray",
|
|
1389
|
+
"BitMatrix",
|
|
1390
|
+
"BitSet",
|
|
1391
|
+
"BitVector",
|
|
1392
|
+
"Bool",
|
|
1393
|
+
"BoundsError",
|
|
1394
|
+
"CapturedException",
|
|
1395
|
+
"CartesianIndex",
|
|
1396
|
+
"CartesianIndices",
|
|
1397
|
+
"Cchar",
|
|
1398
|
+
"Cdouble",
|
|
1399
|
+
"Cfloat",
|
|
1400
|
+
"Channel",
|
|
1401
|
+
"Char",
|
|
1402
|
+
"Cint",
|
|
1403
|
+
"Cintmax_t",
|
|
1404
|
+
"Clong",
|
|
1405
|
+
"Clonglong",
|
|
1406
|
+
"Cmd",
|
|
1407
|
+
"Colon",
|
|
1408
|
+
"Complex",
|
|
1409
|
+
"ComplexF16",
|
|
1410
|
+
"ComplexF32",
|
|
1411
|
+
"ComplexF64",
|
|
1412
|
+
"CompositeException",
|
|
1413
|
+
"Condition",
|
|
1414
|
+
"Cptrdiff_t",
|
|
1415
|
+
"Cshort",
|
|
1416
|
+
"Csize_t",
|
|
1417
|
+
"Cssize_t",
|
|
1418
|
+
"Cstring",
|
|
1419
|
+
"Cuchar",
|
|
1420
|
+
"Cuint",
|
|
1421
|
+
"Cuintmax_t",
|
|
1422
|
+
"Culong",
|
|
1423
|
+
"Culonglong",
|
|
1424
|
+
"Cushort",
|
|
1425
|
+
"Cvoid",
|
|
1426
|
+
"Cwchar_t",
|
|
1427
|
+
"Cwstring",
|
|
1428
|
+
"DataType",
|
|
1429
|
+
"DenseArray",
|
|
1430
|
+
"DenseMatrix",
|
|
1431
|
+
"DenseVecOrMat",
|
|
1432
|
+
"DenseVector",
|
|
1433
|
+
"Dict",
|
|
1434
|
+
"DimensionMismatch",
|
|
1435
|
+
"Dims",
|
|
1436
|
+
"DivideError",
|
|
1437
|
+
"DomainError",
|
|
1438
|
+
"EOFError",
|
|
1439
|
+
"Enum",
|
|
1440
|
+
"ErrorException",
|
|
1441
|
+
"Exception",
|
|
1442
|
+
"ExponentialBackOff",
|
|
1443
|
+
"Expr",
|
|
1444
|
+
"Float16",
|
|
1445
|
+
"Float32",
|
|
1446
|
+
"Float64",
|
|
1447
|
+
"Function",
|
|
1448
|
+
"GlobalRef",
|
|
1449
|
+
"HTML",
|
|
1450
|
+
"IO",
|
|
1451
|
+
"IOBuffer",
|
|
1452
|
+
"IOContext",
|
|
1453
|
+
"IOStream",
|
|
1454
|
+
"IdDict",
|
|
1455
|
+
"IndexCartesian",
|
|
1456
|
+
"IndexLinear",
|
|
1457
|
+
"IndexStyle",
|
|
1458
|
+
"InexactError",
|
|
1459
|
+
"InitError",
|
|
1460
|
+
"Int",
|
|
1461
|
+
"Int128",
|
|
1462
|
+
"Int16",
|
|
1463
|
+
"Int32",
|
|
1464
|
+
"Int64",
|
|
1465
|
+
"Int8",
|
|
1466
|
+
"Integer",
|
|
1467
|
+
"InterruptException",
|
|
1468
|
+
"InvalidStateException",
|
|
1469
|
+
"Irrational",
|
|
1470
|
+
"KeyError",
|
|
1471
|
+
"LinRange",
|
|
1472
|
+
"LineNumberNode",
|
|
1473
|
+
"LinearIndices",
|
|
1474
|
+
"LoadError",
|
|
1475
|
+
"MIME",
|
|
1476
|
+
"Matrix",
|
|
1477
|
+
"Method",
|
|
1478
|
+
"MethodError",
|
|
1479
|
+
"Missing",
|
|
1480
|
+
"MissingException",
|
|
1481
|
+
"Module",
|
|
1482
|
+
"NTuple",
|
|
1483
|
+
"NamedTuple",
|
|
1484
|
+
"Nothing",
|
|
1485
|
+
"Number",
|
|
1486
|
+
"OrdinalRange",
|
|
1487
|
+
"OutOfMemoryError",
|
|
1488
|
+
"OverflowError",
|
|
1489
|
+
"Pair",
|
|
1490
|
+
"PartialQuickSort",
|
|
1491
|
+
"PermutedDimsArray",
|
|
1492
|
+
"Pipe",
|
|
1493
|
+
"ProcessFailedException",
|
|
1494
|
+
"Ptr",
|
|
1495
|
+
"QuoteNode",
|
|
1496
|
+
"Rational",
|
|
1497
|
+
"RawFD",
|
|
1498
|
+
"ReadOnlyMemoryError",
|
|
1499
|
+
"Real",
|
|
1500
|
+
"ReentrantLock",
|
|
1501
|
+
"Ref",
|
|
1502
|
+
"Regex",
|
|
1503
|
+
"RegexMatch",
|
|
1504
|
+
"RoundingMode",
|
|
1505
|
+
"SegmentationFault",
|
|
1506
|
+
"Set",
|
|
1507
|
+
"Signed",
|
|
1508
|
+
"Some",
|
|
1509
|
+
"StackOverflowError",
|
|
1510
|
+
"StepRange",
|
|
1511
|
+
"StepRangeLen",
|
|
1512
|
+
"StridedArray",
|
|
1513
|
+
"StridedMatrix",
|
|
1514
|
+
"StridedVecOrMat",
|
|
1515
|
+
"StridedVector",
|
|
1516
|
+
"String",
|
|
1517
|
+
"StringIndexError",
|
|
1518
|
+
"SubArray",
|
|
1519
|
+
"SubString",
|
|
1520
|
+
"SubstitutionString",
|
|
1521
|
+
"Symbol",
|
|
1522
|
+
"SystemError",
|
|
1523
|
+
"Task",
|
|
1524
|
+
"TaskFailedException",
|
|
1525
|
+
"Text",
|
|
1526
|
+
"TextDisplay",
|
|
1527
|
+
"Timer",
|
|
1528
|
+
"Tuple",
|
|
1529
|
+
"Type",
|
|
1530
|
+
"TypeError",
|
|
1531
|
+
"TypeVar",
|
|
1532
|
+
"UInt",
|
|
1533
|
+
"UInt128",
|
|
1534
|
+
"UInt16",
|
|
1535
|
+
"UInt32",
|
|
1536
|
+
"UInt64",
|
|
1537
|
+
"UInt8",
|
|
1538
|
+
"UndefInitializer",
|
|
1539
|
+
"UndefKeywordError",
|
|
1540
|
+
"UndefRefError",
|
|
1541
|
+
"UndefVarError",
|
|
1542
|
+
"Union",
|
|
1543
|
+
"UnionAll",
|
|
1544
|
+
"UnitRange",
|
|
1545
|
+
"Unsigned",
|
|
1546
|
+
"Val",
|
|
1547
|
+
"Vararg",
|
|
1548
|
+
"VecElement",
|
|
1549
|
+
"VecOrMat",
|
|
1550
|
+
"Vector",
|
|
1551
|
+
"VersionNumber",
|
|
1552
|
+
"WeakKeyDict",
|
|
1553
|
+
"WeakRef"
|
|
1554
|
+
]
|
|
1555
|
+
};
|
|
1556
|
+
const DEFAULT = {
|
|
1557
|
+
keywords: KEYWORDS,
|
|
1558
|
+
illegal: /<\//
|
|
1559
|
+
};
|
|
1560
|
+
const NUMBER = {
|
|
1561
|
+
className: "number",
|
|
1562
|
+
begin: /(\b0x[\d_]*(\.[\d_]*)?|0x\.\d[\d_]*)p[-+]?\d+|\b0[box][a-fA-F0-9][a-fA-F0-9_]*|(\b\d[\d_]*(\.[\d_]*)?|\.\d[\d_]*)([eEfF][-+]?\d+)?/,
|
|
1563
|
+
relevance: 0
|
|
1564
|
+
};
|
|
1565
|
+
const CHAR = {
|
|
1566
|
+
className: "string",
|
|
1567
|
+
begin: /'(.|\\[xXuU][a-zA-Z0-9]+)'/
|
|
1568
|
+
};
|
|
1569
|
+
const INTERPOLATION = {
|
|
1570
|
+
className: "subst",
|
|
1571
|
+
begin: /\$\(/,
|
|
1572
|
+
end: /\)/,
|
|
1573
|
+
keywords: KEYWORDS
|
|
1574
|
+
};
|
|
1575
|
+
const INTERPOLATED_VARIABLE = {
|
|
1576
|
+
className: "variable",
|
|
1577
|
+
begin: "\\$[A-Za-z_\\u00A1-\\uFFFF][A-Za-z_0-9\\u00A1-\\uFFFF]*"
|
|
1578
|
+
};
|
|
1579
|
+
const STRING = {
|
|
1580
|
+
className: "string",
|
|
1581
|
+
contains: [
|
|
1582
|
+
hljs.BACKSLASH_ESCAPE,
|
|
1583
|
+
INTERPOLATION,
|
|
1584
|
+
INTERPOLATED_VARIABLE
|
|
1585
|
+
],
|
|
1586
|
+
variants: [{
|
|
1587
|
+
begin: /\w*"""/,
|
|
1588
|
+
end: /"""\w*/,
|
|
1589
|
+
relevance: 10
|
|
1590
|
+
}, {
|
|
1591
|
+
begin: /\w*"/,
|
|
1592
|
+
end: /"\w*/
|
|
1593
|
+
}]
|
|
1594
|
+
};
|
|
1595
|
+
const COMMAND = {
|
|
1596
|
+
className: "string",
|
|
1597
|
+
contains: [
|
|
1598
|
+
hljs.BACKSLASH_ESCAPE,
|
|
1599
|
+
INTERPOLATION,
|
|
1600
|
+
INTERPOLATED_VARIABLE
|
|
1601
|
+
],
|
|
1602
|
+
begin: "`",
|
|
1603
|
+
end: "`"
|
|
1604
|
+
};
|
|
1605
|
+
const MACROCALL = {
|
|
1606
|
+
className: "meta",
|
|
1607
|
+
begin: "@[A-Za-z_\\u00A1-\\uFFFF][A-Za-z_0-9\\u00A1-\\uFFFF]*"
|
|
1608
|
+
};
|
|
1609
|
+
const COMMENT = {
|
|
1610
|
+
className: "comment",
|
|
1611
|
+
variants: [{
|
|
1612
|
+
begin: "#=",
|
|
1613
|
+
end: "=#",
|
|
1614
|
+
relevance: 10
|
|
1615
|
+
}, {
|
|
1616
|
+
begin: "#",
|
|
1617
|
+
end: "$"
|
|
1618
|
+
}]
|
|
1619
|
+
};
|
|
1620
|
+
DEFAULT.name = "Julia";
|
|
1621
|
+
DEFAULT.contains = [
|
|
1622
|
+
NUMBER,
|
|
1623
|
+
CHAR,
|
|
1624
|
+
STRING,
|
|
1625
|
+
COMMAND,
|
|
1626
|
+
MACROCALL,
|
|
1627
|
+
COMMENT,
|
|
1628
|
+
hljs.HASH_COMMENT_MODE,
|
|
1629
|
+
{
|
|
1630
|
+
className: "keyword",
|
|
1631
|
+
begin: "\\b(((abstract|primitive)\\s+)type|(mutable\\s+)?struct)\\b"
|
|
1632
|
+
},
|
|
1633
|
+
{ begin: /<:/ }
|
|
1634
|
+
];
|
|
1635
|
+
INTERPOLATION.contains = DEFAULT.contains;
|
|
1636
|
+
return DEFAULT;
|
|
1637
|
+
}
|
|
1638
|
+
//#endregion
|
|
1290
1639
|
//#region ../../node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/matlab.js
|
|
1291
1640
|
function matlab(hljs) {
|
|
1292
|
-
const TRANSPOSE_RE = "('|\\.')+";
|
|
1293
1641
|
const TRANSPOSE = {
|
|
1294
1642
|
relevance: 0,
|
|
1295
|
-
contains: [{ begin:
|
|
1643
|
+
contains: [{ begin: "('|\\.')+" }]
|
|
1296
1644
|
};
|
|
1297
1645
|
return {
|
|
1298
1646
|
name: "Matlab",
|
|
@@ -1324,7 +1672,7 @@ function matlab(hljs) {
|
|
|
1324
1672
|
starts: TRANSPOSE
|
|
1325
1673
|
},
|
|
1326
1674
|
{
|
|
1327
|
-
begin: "[a-zA-Z][a-zA-Z_0-9]*"
|
|
1675
|
+
begin: "[a-zA-Z][a-zA-Z_0-9]*('|\\.')+",
|
|
1328
1676
|
relevance: 0
|
|
1329
1677
|
},
|
|
1330
1678
|
{
|
|
@@ -1744,11 +2092,7 @@ function powershell(hljs) {
|
|
|
1744
2092
|
//#region ../../node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/properties.js
|
|
1745
2093
|
/** @type LanguageFn */
|
|
1746
2094
|
function properties(hljs) {
|
|
1747
|
-
const
|
|
1748
|
-
const WS1 = "[ \\t\\f]+";
|
|
1749
|
-
const EQUAL_DELIM = WS0 + "[:=][ \\t\\f]*";
|
|
1750
|
-
const WS_DELIM = WS1;
|
|
1751
|
-
const DELIM = "(" + EQUAL_DELIM + "|[ \\t\\f]+)";
|
|
2095
|
+
const DELIM = "([ \\t\\f]*[:=][ \\t\\f]*|[ \\t\\f]+)";
|
|
1752
2096
|
const KEY = "([^\\\\:= \\t\\f\\n]|\\\\.)+";
|
|
1753
2097
|
const DELIM_AND_VALUE = {
|
|
1754
2098
|
end: DELIM,
|
|
@@ -1769,7 +2113,7 @@ function properties(hljs) {
|
|
|
1769
2113
|
hljs.COMMENT("^\\s*[!#]", "$"),
|
|
1770
2114
|
{
|
|
1771
2115
|
returnBegin: true,
|
|
1772
|
-
variants: [{ begin:
|
|
2116
|
+
variants: [{ begin: "([^\\\\:= \\t\\f\\n]|\\\\.)+[ \\t\\f]*[:=][ \\t\\f]*" }, { begin: "([^\\\\:= \\t\\f\\n]|\\\\.)+[ \\t\\f]+" }],
|
|
1773
2117
|
contains: [{
|
|
1774
2118
|
className: "attr",
|
|
1775
2119
|
begin: KEY,
|
|
@@ -1779,7 +2123,7 @@ function properties(hljs) {
|
|
|
1779
2123
|
},
|
|
1780
2124
|
{
|
|
1781
2125
|
className: "attr",
|
|
1782
|
-
begin:
|
|
2126
|
+
begin: "([^\\\\:= \\t\\f\\n]|\\\\.)+[ \\t\\f]*$"
|
|
1783
2127
|
}
|
|
1784
2128
|
]
|
|
1785
2129
|
};
|
|
@@ -1915,10 +2259,6 @@ function scala(hljs) {
|
|
|
1915
2259
|
],
|
|
1916
2260
|
beginScope: { 2: "keyword" }
|
|
1917
2261
|
};
|
|
1918
|
-
const DIRECTIVE_VALUE = {
|
|
1919
|
-
className: "string",
|
|
1920
|
-
begin: /\S+/
|
|
1921
|
-
};
|
|
1922
2262
|
return {
|
|
1923
2263
|
name: "Scala",
|
|
1924
2264
|
keywords: {
|
|
@@ -1940,7 +2280,10 @@ function scala(hljs) {
|
|
|
1940
2280
|
5: "type"
|
|
1941
2281
|
},
|
|
1942
2282
|
end: /$/,
|
|
1943
|
-
contains: [
|
|
2283
|
+
contains: [{
|
|
2284
|
+
className: "string",
|
|
2285
|
+
begin: /\S+/
|
|
2286
|
+
}]
|
|
1944
2287
|
},
|
|
1945
2288
|
hljs.C_LINE_COMMENT_MODE,
|
|
1946
2289
|
hljs.C_BLOCK_COMMENT_MODE,
|
|
@@ -2322,7 +2665,7 @@ function c(hljs) {
|
|
|
2322
2665
|
const C_LINE_COMMENT_MODE = hljs.COMMENT("//", "$", { contains: [{ begin: /\\\n/ }] });
|
|
2323
2666
|
const DECLTYPE_AUTO_RE = "decltype\\(auto\\)";
|
|
2324
2667
|
const NAMESPACE_RE = "[a-zA-Z_]\\w*::";
|
|
2325
|
-
const FUNCTION_TYPE_RE = "(
|
|
2668
|
+
const FUNCTION_TYPE_RE = "(decltype\\(auto\\)|" + regex.optional(NAMESPACE_RE) + "[a-zA-Z_]\\w*" + regex.optional("<[^<>]+>") + ")";
|
|
2326
2669
|
const TYPES = {
|
|
2327
2670
|
className: "type",
|
|
2328
2671
|
variants: [{ begin: "\\b[a-z\\d_]*_t\\b" }, { match: /\batomic_[a-z]{3,6}\b/ }]
|
|
@@ -2586,7 +2929,7 @@ function cpp(hljs) {
|
|
|
2586
2929
|
const C_LINE_COMMENT_MODE = hljs.COMMENT("//", "$", { contains: [{ begin: /\\\n/ }] });
|
|
2587
2930
|
const DECLTYPE_AUTO_RE = "decltype\\(auto\\)";
|
|
2588
2931
|
const NAMESPACE_RE = "[a-zA-Z_]\\w*::";
|
|
2589
|
-
const FUNCTION_TYPE_RE = "(?!struct)(
|
|
2932
|
+
const FUNCTION_TYPE_RE = "(?!struct)(decltype\\(auto\\)|" + regex.optional(NAMESPACE_RE) + "[a-zA-Z_]\\w*" + regex.optional("<[^<>]+>") + ")";
|
|
2590
2933
|
const CPP_PRIMITIVE_TYPES = {
|
|
2591
2934
|
className: "type",
|
|
2592
2935
|
begin: "\\b[a-z\\d_]*_t\\b"
|
|
@@ -4237,7 +4580,6 @@ function css(hljs) {
|
|
|
4237
4580
|
const VENDOR_PREFIX = { begin: /-(webkit|moz|ms|o)-(?=[a-z])/ };
|
|
4238
4581
|
const AT_MODIFIERS = "and or not only";
|
|
4239
4582
|
const AT_PROPERTY_RE = /@-?\w[\w]*(-\w+)*/;
|
|
4240
|
-
const IDENT_RE = "[a-zA-Z-][a-zA-Z0-9_-]*";
|
|
4241
4583
|
const STRINGS = [hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE];
|
|
4242
4584
|
return {
|
|
4243
4585
|
name: "CSS",
|
|
@@ -4256,7 +4598,7 @@ function css(hljs) {
|
|
|
4256
4598
|
},
|
|
4257
4599
|
{
|
|
4258
4600
|
className: "selector-class",
|
|
4259
|
-
begin: "\\."
|
|
4601
|
+
begin: "\\.[a-zA-Z-][a-zA-Z0-9_-]*",
|
|
4260
4602
|
relevance: 0
|
|
4261
4603
|
},
|
|
4262
4604
|
modes.ATTRIBUTE_SELECTOR_MODE,
|
|
@@ -4707,7 +5049,7 @@ function recurRegex(re, substitution, depth) {
|
|
|
4707
5049
|
function java(hljs) {
|
|
4708
5050
|
const regex = hljs.regex;
|
|
4709
5051
|
const JAVA_IDENT_RE = "[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*";
|
|
4710
|
-
const GENERIC_IDENT_RE = JAVA_IDENT_RE + recurRegex("(?:<
|
|
5052
|
+
const GENERIC_IDENT_RE = JAVA_IDENT_RE + recurRegex("(?:<[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*~~~(?:\\s*,\\s*[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*~~~)*>)?", /~~~/g, 2);
|
|
4711
5053
|
const KEYWORDS = {
|
|
4712
5054
|
keyword: [
|
|
4713
5055
|
"synchronized",
|
|
@@ -4774,7 +5116,7 @@ function java(hljs) {
|
|
|
4774
5116
|
};
|
|
4775
5117
|
const ANNOTATION = {
|
|
4776
5118
|
className: "meta",
|
|
4777
|
-
begin: "@"
|
|
5119
|
+
begin: "@[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",
|
|
4778
5120
|
contains: [{
|
|
4779
5121
|
begin: /\(/,
|
|
4780
5122
|
end: /\)/,
|
|
@@ -5060,6 +5402,10 @@ function javascript$1(hljs) {
|
|
|
5060
5402
|
const XML_TAG = {
|
|
5061
5403
|
begin: /<[A-Za-z0-9\\._:-]+/,
|
|
5062
5404
|
end: /\/[A-Za-z0-9\\._:-]+>|\/>/,
|
|
5405
|
+
/**
|
|
5406
|
+
* @param {RegExpMatchArray} match
|
|
5407
|
+
* @param {CallbackResponse} response
|
|
5408
|
+
*/
|
|
5063
5409
|
isTrulyOpeningTag: (match, response) => {
|
|
5064
5410
|
const afterMatchIndex = match[0].length + match.index;
|
|
5065
5411
|
const nextChar = match.input[afterMatchIndex];
|
|
@@ -5173,7 +5519,7 @@ function javascript$1(hljs) {
|
|
|
5173
5519
|
},
|
|
5174
5520
|
{
|
|
5175
5521
|
className: "variable",
|
|
5176
|
-
begin:
|
|
5522
|
+
begin: "[A-Za-z$_][0-9A-Za-z$_]*(?=\\s*(-)|$)",
|
|
5177
5523
|
endsParent: true,
|
|
5178
5524
|
relevance: 0
|
|
5179
5525
|
},
|
|
@@ -5450,7 +5796,7 @@ function javascript$1(hljs) {
|
|
|
5450
5796
|
},
|
|
5451
5797
|
PROPERTY_ACCESS,
|
|
5452
5798
|
{
|
|
5453
|
-
match: "\\$"
|
|
5799
|
+
match: "\\$[A-Za-z$_][0-9A-Za-z$_]*",
|
|
5454
5800
|
relevance: 0
|
|
5455
5801
|
},
|
|
5456
5802
|
{
|
|
@@ -6511,8 +6857,7 @@ function less(hljs) {
|
|
|
6511
6857
|
const modes = MODES$1(hljs);
|
|
6512
6858
|
const PSEUDO_SELECTORS$1 = PSEUDO_SELECTORS;
|
|
6513
6859
|
const AT_MODIFIERS = "and or not only";
|
|
6514
|
-
const
|
|
6515
|
-
const INTERP_IDENT_RE = "(" + IDENT_RE + "|@\\{[\\w-]+\\})";
|
|
6860
|
+
const INTERP_IDENT_RE = "([\\w-]+|@\\{[\\w-]+\\})";
|
|
6516
6861
|
const RULES = [];
|
|
6517
6862
|
const VALUE_MODES = [];
|
|
6518
6863
|
const STRING_MODE = function(c) {
|
|
@@ -6547,9 +6892,9 @@ function less(hljs) {
|
|
|
6547
6892
|
end: "[\\)\\n]",
|
|
6548
6893
|
excludeEnd: true
|
|
6549
6894
|
}
|
|
6550
|
-
}, modes.HEXCOLOR, PARENS_MODE, IDENT_MODE("variable", "@@?"
|
|
6895
|
+
}, modes.HEXCOLOR, PARENS_MODE, IDENT_MODE("variable", "@@?[\\w-]+", 10), IDENT_MODE("variable", "@\\{[\\w-]+\\}"), IDENT_MODE("built_in", "~?`[^`]*?`"), {
|
|
6551
6896
|
className: "attribute",
|
|
6552
|
-
begin:
|
|
6897
|
+
begin: "[\\w-]+\\s*:",
|
|
6553
6898
|
end: ":",
|
|
6554
6899
|
returnBegin: true,
|
|
6555
6900
|
excludeEnd: true
|
|
@@ -6565,7 +6910,7 @@ function less(hljs) {
|
|
|
6565
6910
|
contains: [{ beginKeywords: "and not" }].concat(VALUE_MODES)
|
|
6566
6911
|
};
|
|
6567
6912
|
const RULE_MODE = {
|
|
6568
|
-
begin:
|
|
6913
|
+
begin: "([\\w-]+|@\\{[\\w-]+\\})\\s*:",
|
|
6569
6914
|
returnBegin: true,
|
|
6570
6915
|
end: /[;}]/,
|
|
6571
6916
|
relevance: 0,
|
|
@@ -6599,9 +6944,9 @@ function less(hljs) {
|
|
|
6599
6944
|
const VAR_RULE_MODE = {
|
|
6600
6945
|
className: "variable",
|
|
6601
6946
|
variants: [{
|
|
6602
|
-
begin: "@
|
|
6947
|
+
begin: "@[\\w-]+\\s*:",
|
|
6603
6948
|
relevance: 15
|
|
6604
|
-
}, { begin: "@"
|
|
6949
|
+
}, { begin: "@[\\w-]+" }],
|
|
6605
6950
|
starts: {
|
|
6606
6951
|
end: "[;}]",
|
|
6607
6952
|
returnEnd: true,
|
|
@@ -6625,15 +6970,15 @@ function less(hljs) {
|
|
|
6625
6970
|
hljs.C_BLOCK_COMMENT_MODE,
|
|
6626
6971
|
MIXIN_GUARD_MODE,
|
|
6627
6972
|
IDENT_MODE("keyword", "all\\b"),
|
|
6628
|
-
IDENT_MODE("variable", "@\\{
|
|
6973
|
+
IDENT_MODE("variable", "@\\{[\\w-]+\\}"),
|
|
6629
6974
|
{
|
|
6630
6975
|
begin: "\\b(" + TAGS$1.join("|") + ")\\b",
|
|
6631
6976
|
className: "selector-tag"
|
|
6632
6977
|
},
|
|
6633
6978
|
modes.CSS_NUMBER_MODE,
|
|
6634
6979
|
IDENT_MODE("selector-tag", INTERP_IDENT_RE, 0),
|
|
6635
|
-
IDENT_MODE("selector-id", "#"
|
|
6636
|
-
IDENT_MODE("selector-class", "\\."
|
|
6980
|
+
IDENT_MODE("selector-id", "#([\\w-]+|@\\{[\\w-]+\\})"),
|
|
6981
|
+
IDENT_MODE("selector-class", "\\.([\\w-]+|@\\{[\\w-]+\\})", 0),
|
|
6637
6982
|
IDENT_MODE("selector-tag", "&", 0),
|
|
6638
6983
|
modes.ATTRIBUTE_SELECTOR_MODE,
|
|
6639
6984
|
{
|
|
@@ -6677,7 +7022,7 @@ function lua(hljs) {
|
|
|
6677
7022
|
end: CLOSING_LONG_BRACKET,
|
|
6678
7023
|
contains: ["self"]
|
|
6679
7024
|
};
|
|
6680
|
-
const COMMENTS = [hljs.COMMENT("--(
|
|
7025
|
+
const COMMENTS = [hljs.COMMENT("--(?!\\[=*\\[)", "$"), hljs.COMMENT("--\\[=*\\[", CLOSING_LONG_BRACKET, {
|
|
6681
7026
|
contains: [LONG_BRACKETS],
|
|
6682
7027
|
relevance: 10
|
|
6683
7028
|
})];
|
|
@@ -6977,163 +7322,159 @@ function objectivec(hljs) {
|
|
|
6977
7322
|
begin: "\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"
|
|
6978
7323
|
};
|
|
6979
7324
|
const IDENTIFIER_RE = /[a-zA-Z@][a-zA-Z0-9_]*/;
|
|
6980
|
-
const TYPES = [
|
|
6981
|
-
"int",
|
|
6982
|
-
"float",
|
|
6983
|
-
"char",
|
|
6984
|
-
"unsigned",
|
|
6985
|
-
"signed",
|
|
6986
|
-
"short",
|
|
6987
|
-
"long",
|
|
6988
|
-
"double",
|
|
6989
|
-
"wchar_t",
|
|
6990
|
-
"unichar",
|
|
6991
|
-
"void",
|
|
6992
|
-
"bool",
|
|
6993
|
-
"BOOL",
|
|
6994
|
-
"id|0",
|
|
6995
|
-
"_Bool"
|
|
6996
|
-
];
|
|
6997
|
-
const KWS = [
|
|
6998
|
-
"while",
|
|
6999
|
-
"export",
|
|
7000
|
-
"sizeof",
|
|
7001
|
-
"typedef",
|
|
7002
|
-
"const",
|
|
7003
|
-
"struct",
|
|
7004
|
-
"for",
|
|
7005
|
-
"union",
|
|
7006
|
-
"volatile",
|
|
7007
|
-
"static",
|
|
7008
|
-
"mutable",
|
|
7009
|
-
"if",
|
|
7010
|
-
"do",
|
|
7011
|
-
"return",
|
|
7012
|
-
"goto",
|
|
7013
|
-
"enum",
|
|
7014
|
-
"else",
|
|
7015
|
-
"break",
|
|
7016
|
-
"extern",
|
|
7017
|
-
"asm",
|
|
7018
|
-
"case",
|
|
7019
|
-
"default",
|
|
7020
|
-
"register",
|
|
7021
|
-
"explicit",
|
|
7022
|
-
"typename",
|
|
7023
|
-
"switch",
|
|
7024
|
-
"continue",
|
|
7025
|
-
"inline",
|
|
7026
|
-
"readonly",
|
|
7027
|
-
"assign",
|
|
7028
|
-
"readwrite",
|
|
7029
|
-
"self",
|
|
7030
|
-
"@synchronized",
|
|
7031
|
-
"id",
|
|
7032
|
-
"typeof",
|
|
7033
|
-
"nonatomic",
|
|
7034
|
-
"IBOutlet",
|
|
7035
|
-
"IBAction",
|
|
7036
|
-
"strong",
|
|
7037
|
-
"weak",
|
|
7038
|
-
"copy",
|
|
7039
|
-
"in",
|
|
7040
|
-
"out",
|
|
7041
|
-
"inout",
|
|
7042
|
-
"bycopy",
|
|
7043
|
-
"byref",
|
|
7044
|
-
"oneway",
|
|
7045
|
-
"__strong",
|
|
7046
|
-
"__weak",
|
|
7047
|
-
"__block",
|
|
7048
|
-
"__autoreleasing",
|
|
7049
|
-
"@private",
|
|
7050
|
-
"@protected",
|
|
7051
|
-
"@public",
|
|
7052
|
-
"@try",
|
|
7053
|
-
"@property",
|
|
7054
|
-
"@end",
|
|
7055
|
-
"@throw",
|
|
7056
|
-
"@catch",
|
|
7057
|
-
"@finally",
|
|
7058
|
-
"@autoreleasepool",
|
|
7059
|
-
"@synthesize",
|
|
7060
|
-
"@dynamic",
|
|
7061
|
-
"@selector",
|
|
7062
|
-
"@optional",
|
|
7063
|
-
"@required",
|
|
7064
|
-
"@encode",
|
|
7065
|
-
"@package",
|
|
7066
|
-
"@import",
|
|
7067
|
-
"@defs",
|
|
7068
|
-
"@compatibility_alias",
|
|
7069
|
-
"__bridge",
|
|
7070
|
-
"__bridge_transfer",
|
|
7071
|
-
"__bridge_retained",
|
|
7072
|
-
"__bridge_retain",
|
|
7073
|
-
"__covariant",
|
|
7074
|
-
"__contravariant",
|
|
7075
|
-
"__kindof",
|
|
7076
|
-
"_Nonnull",
|
|
7077
|
-
"_Nullable",
|
|
7078
|
-
"_Null_unspecified",
|
|
7079
|
-
"__FUNCTION__",
|
|
7080
|
-
"__PRETTY_FUNCTION__",
|
|
7081
|
-
"__attribute__",
|
|
7082
|
-
"getter",
|
|
7083
|
-
"setter",
|
|
7084
|
-
"retain",
|
|
7085
|
-
"unsafe_unretained",
|
|
7086
|
-
"nonnull",
|
|
7087
|
-
"nullable",
|
|
7088
|
-
"null_unspecified",
|
|
7089
|
-
"null_resettable",
|
|
7090
|
-
"class",
|
|
7091
|
-
"instancetype",
|
|
7092
|
-
"NS_DESIGNATED_INITIALIZER",
|
|
7093
|
-
"NS_UNAVAILABLE",
|
|
7094
|
-
"NS_REQUIRES_SUPER",
|
|
7095
|
-
"NS_RETURNS_INNER_POINTER",
|
|
7096
|
-
"NS_INLINE",
|
|
7097
|
-
"NS_AVAILABLE",
|
|
7098
|
-
"NS_DEPRECATED",
|
|
7099
|
-
"NS_ENUM",
|
|
7100
|
-
"NS_OPTIONS",
|
|
7101
|
-
"NS_SWIFT_UNAVAILABLE",
|
|
7102
|
-
"NS_ASSUME_NONNULL_BEGIN",
|
|
7103
|
-
"NS_ASSUME_NONNULL_END",
|
|
7104
|
-
"NS_REFINED_FOR_SWIFT",
|
|
7105
|
-
"NS_SWIFT_NAME",
|
|
7106
|
-
"NS_SWIFT_NOTHROW",
|
|
7107
|
-
"NS_DURING",
|
|
7108
|
-
"NS_HANDLER",
|
|
7109
|
-
"NS_ENDHANDLER",
|
|
7110
|
-
"NS_VALUERETURN",
|
|
7111
|
-
"NS_VOIDRETURN"
|
|
7112
|
-
];
|
|
7113
|
-
const LITERALS = [
|
|
7114
|
-
"false",
|
|
7115
|
-
"true",
|
|
7116
|
-
"FALSE",
|
|
7117
|
-
"TRUE",
|
|
7118
|
-
"nil",
|
|
7119
|
-
"YES",
|
|
7120
|
-
"NO",
|
|
7121
|
-
"NULL"
|
|
7122
|
-
];
|
|
7123
|
-
const BUILT_INS = [
|
|
7124
|
-
"dispatch_once_t",
|
|
7125
|
-
"dispatch_queue_t",
|
|
7126
|
-
"dispatch_sync",
|
|
7127
|
-
"dispatch_async",
|
|
7128
|
-
"dispatch_once"
|
|
7129
|
-
];
|
|
7130
7325
|
const KEYWORDS = {
|
|
7131
7326
|
"variable.language": ["this", "super"],
|
|
7132
7327
|
$pattern: IDENTIFIER_RE,
|
|
7133
|
-
keyword:
|
|
7134
|
-
|
|
7135
|
-
|
|
7136
|
-
|
|
7328
|
+
keyword: [
|
|
7329
|
+
"while",
|
|
7330
|
+
"export",
|
|
7331
|
+
"sizeof",
|
|
7332
|
+
"typedef",
|
|
7333
|
+
"const",
|
|
7334
|
+
"struct",
|
|
7335
|
+
"for",
|
|
7336
|
+
"union",
|
|
7337
|
+
"volatile",
|
|
7338
|
+
"static",
|
|
7339
|
+
"mutable",
|
|
7340
|
+
"if",
|
|
7341
|
+
"do",
|
|
7342
|
+
"return",
|
|
7343
|
+
"goto",
|
|
7344
|
+
"enum",
|
|
7345
|
+
"else",
|
|
7346
|
+
"break",
|
|
7347
|
+
"extern",
|
|
7348
|
+
"asm",
|
|
7349
|
+
"case",
|
|
7350
|
+
"default",
|
|
7351
|
+
"register",
|
|
7352
|
+
"explicit",
|
|
7353
|
+
"typename",
|
|
7354
|
+
"switch",
|
|
7355
|
+
"continue",
|
|
7356
|
+
"inline",
|
|
7357
|
+
"readonly",
|
|
7358
|
+
"assign",
|
|
7359
|
+
"readwrite",
|
|
7360
|
+
"self",
|
|
7361
|
+
"@synchronized",
|
|
7362
|
+
"id",
|
|
7363
|
+
"typeof",
|
|
7364
|
+
"nonatomic",
|
|
7365
|
+
"IBOutlet",
|
|
7366
|
+
"IBAction",
|
|
7367
|
+
"strong",
|
|
7368
|
+
"weak",
|
|
7369
|
+
"copy",
|
|
7370
|
+
"in",
|
|
7371
|
+
"out",
|
|
7372
|
+
"inout",
|
|
7373
|
+
"bycopy",
|
|
7374
|
+
"byref",
|
|
7375
|
+
"oneway",
|
|
7376
|
+
"__strong",
|
|
7377
|
+
"__weak",
|
|
7378
|
+
"__block",
|
|
7379
|
+
"__autoreleasing",
|
|
7380
|
+
"@private",
|
|
7381
|
+
"@protected",
|
|
7382
|
+
"@public",
|
|
7383
|
+
"@try",
|
|
7384
|
+
"@property",
|
|
7385
|
+
"@end",
|
|
7386
|
+
"@throw",
|
|
7387
|
+
"@catch",
|
|
7388
|
+
"@finally",
|
|
7389
|
+
"@autoreleasepool",
|
|
7390
|
+
"@synthesize",
|
|
7391
|
+
"@dynamic",
|
|
7392
|
+
"@selector",
|
|
7393
|
+
"@optional",
|
|
7394
|
+
"@required",
|
|
7395
|
+
"@encode",
|
|
7396
|
+
"@package",
|
|
7397
|
+
"@import",
|
|
7398
|
+
"@defs",
|
|
7399
|
+
"@compatibility_alias",
|
|
7400
|
+
"__bridge",
|
|
7401
|
+
"__bridge_transfer",
|
|
7402
|
+
"__bridge_retained",
|
|
7403
|
+
"__bridge_retain",
|
|
7404
|
+
"__covariant",
|
|
7405
|
+
"__contravariant",
|
|
7406
|
+
"__kindof",
|
|
7407
|
+
"_Nonnull",
|
|
7408
|
+
"_Nullable",
|
|
7409
|
+
"_Null_unspecified",
|
|
7410
|
+
"__FUNCTION__",
|
|
7411
|
+
"__PRETTY_FUNCTION__",
|
|
7412
|
+
"__attribute__",
|
|
7413
|
+
"getter",
|
|
7414
|
+
"setter",
|
|
7415
|
+
"retain",
|
|
7416
|
+
"unsafe_unretained",
|
|
7417
|
+
"nonnull",
|
|
7418
|
+
"nullable",
|
|
7419
|
+
"null_unspecified",
|
|
7420
|
+
"null_resettable",
|
|
7421
|
+
"class",
|
|
7422
|
+
"instancetype",
|
|
7423
|
+
"NS_DESIGNATED_INITIALIZER",
|
|
7424
|
+
"NS_UNAVAILABLE",
|
|
7425
|
+
"NS_REQUIRES_SUPER",
|
|
7426
|
+
"NS_RETURNS_INNER_POINTER",
|
|
7427
|
+
"NS_INLINE",
|
|
7428
|
+
"NS_AVAILABLE",
|
|
7429
|
+
"NS_DEPRECATED",
|
|
7430
|
+
"NS_ENUM",
|
|
7431
|
+
"NS_OPTIONS",
|
|
7432
|
+
"NS_SWIFT_UNAVAILABLE",
|
|
7433
|
+
"NS_ASSUME_NONNULL_BEGIN",
|
|
7434
|
+
"NS_ASSUME_NONNULL_END",
|
|
7435
|
+
"NS_REFINED_FOR_SWIFT",
|
|
7436
|
+
"NS_SWIFT_NAME",
|
|
7437
|
+
"NS_SWIFT_NOTHROW",
|
|
7438
|
+
"NS_DURING",
|
|
7439
|
+
"NS_HANDLER",
|
|
7440
|
+
"NS_ENDHANDLER",
|
|
7441
|
+
"NS_VALUERETURN",
|
|
7442
|
+
"NS_VOIDRETURN"
|
|
7443
|
+
],
|
|
7444
|
+
literal: [
|
|
7445
|
+
"false",
|
|
7446
|
+
"true",
|
|
7447
|
+
"FALSE",
|
|
7448
|
+
"TRUE",
|
|
7449
|
+
"nil",
|
|
7450
|
+
"YES",
|
|
7451
|
+
"NO",
|
|
7452
|
+
"NULL"
|
|
7453
|
+
],
|
|
7454
|
+
built_in: [
|
|
7455
|
+
"dispatch_once_t",
|
|
7456
|
+
"dispatch_queue_t",
|
|
7457
|
+
"dispatch_sync",
|
|
7458
|
+
"dispatch_async",
|
|
7459
|
+
"dispatch_once"
|
|
7460
|
+
],
|
|
7461
|
+
type: [
|
|
7462
|
+
"int",
|
|
7463
|
+
"float",
|
|
7464
|
+
"char",
|
|
7465
|
+
"unsigned",
|
|
7466
|
+
"signed",
|
|
7467
|
+
"short",
|
|
7468
|
+
"long",
|
|
7469
|
+
"double",
|
|
7470
|
+
"wchar_t",
|
|
7471
|
+
"unichar",
|
|
7472
|
+
"void",
|
|
7473
|
+
"bool",
|
|
7474
|
+
"BOOL",
|
|
7475
|
+
"id|0",
|
|
7476
|
+
"_Bool"
|
|
7477
|
+
]
|
|
7137
7478
|
};
|
|
7138
7479
|
const CLASS_KEYWORDS = {
|
|
7139
7480
|
$pattern: IDENTIFIER_RE,
|
|
@@ -8696,16 +9037,6 @@ function ruby(hljs) {
|
|
|
8696
9037
|
const RUBY_METHOD_RE = "([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)";
|
|
8697
9038
|
const CLASS_NAME_RE = regex.either(/\b([A-Z]+[a-z0-9]+)+/, /\b([A-Z]+[a-z0-9]+)+[A-Z]+/);
|
|
8698
9039
|
const CLASS_NAME_WITH_NAMESPACE_RE = regex.concat(CLASS_NAME_RE, /(::\w+)*/);
|
|
8699
|
-
const PSEUDO_KWS = [
|
|
8700
|
-
"include",
|
|
8701
|
-
"extend",
|
|
8702
|
-
"prepend",
|
|
8703
|
-
"public",
|
|
8704
|
-
"private",
|
|
8705
|
-
"protected",
|
|
8706
|
-
"raise",
|
|
8707
|
-
"throw"
|
|
8708
|
-
];
|
|
8709
9040
|
const RUBY_KEYWORDS = {
|
|
8710
9041
|
"variable.constant": [
|
|
8711
9042
|
"__FILE__",
|
|
@@ -8747,7 +9078,16 @@ function ruby(hljs) {
|
|
|
8747
9078
|
"when",
|
|
8748
9079
|
"while",
|
|
8749
9080
|
"yield",
|
|
8750
|
-
...
|
|
9081
|
+
...[
|
|
9082
|
+
"include",
|
|
9083
|
+
"extend",
|
|
9084
|
+
"prepend",
|
|
9085
|
+
"public",
|
|
9086
|
+
"private",
|
|
9087
|
+
"protected",
|
|
9088
|
+
"raise",
|
|
9089
|
+
"throw"
|
|
9090
|
+
]
|
|
8751
9091
|
],
|
|
8752
9092
|
built_in: [
|
|
8753
9093
|
"proc",
|
|
@@ -8873,57 +9213,53 @@ function ruby(hljs) {
|
|
|
8873
9213
|
endsParent: true,
|
|
8874
9214
|
keywords: RUBY_KEYWORDS
|
|
8875
9215
|
}] };
|
|
8876
|
-
const INCLUDE_EXTEND = {
|
|
8877
|
-
match: [/(include|extend)\s+/, CLASS_NAME_WITH_NAMESPACE_RE],
|
|
8878
|
-
scope: { 2: "title.class" },
|
|
8879
|
-
keywords: RUBY_KEYWORDS
|
|
8880
|
-
};
|
|
8881
|
-
const CLASS_DEFINITION = {
|
|
8882
|
-
variants: [{ match: [
|
|
8883
|
-
/class\s+/,
|
|
8884
|
-
CLASS_NAME_WITH_NAMESPACE_RE,
|
|
8885
|
-
/\s+<\s+/,
|
|
8886
|
-
CLASS_NAME_WITH_NAMESPACE_RE
|
|
8887
|
-
] }, { match: [/\b(class|module)\s+/, CLASS_NAME_WITH_NAMESPACE_RE] }],
|
|
8888
|
-
scope: {
|
|
8889
|
-
2: "title.class",
|
|
8890
|
-
4: "title.class.inherited"
|
|
8891
|
-
},
|
|
8892
|
-
keywords: RUBY_KEYWORDS
|
|
8893
|
-
};
|
|
8894
|
-
const UPPER_CASE_CONSTANT = {
|
|
8895
|
-
relevance: 0,
|
|
8896
|
-
match: /\b[A-Z][A-Z_0-9]+\b/,
|
|
8897
|
-
className: "variable.constant"
|
|
8898
|
-
};
|
|
8899
|
-
const METHOD_DEFINITION = {
|
|
8900
|
-
match: [
|
|
8901
|
-
/def/,
|
|
8902
|
-
/\s+/,
|
|
8903
|
-
RUBY_METHOD_RE
|
|
8904
|
-
],
|
|
8905
|
-
scope: {
|
|
8906
|
-
1: "keyword",
|
|
8907
|
-
3: "title.function"
|
|
8908
|
-
},
|
|
8909
|
-
contains: [PARAMS]
|
|
8910
|
-
};
|
|
8911
9216
|
const RUBY_DEFAULT_CONTAINS = [
|
|
8912
9217
|
STRING,
|
|
8913
|
-
|
|
8914
|
-
|
|
9218
|
+
{
|
|
9219
|
+
variants: [{ match: [
|
|
9220
|
+
/class\s+/,
|
|
9221
|
+
CLASS_NAME_WITH_NAMESPACE_RE,
|
|
9222
|
+
/\s+<\s+/,
|
|
9223
|
+
CLASS_NAME_WITH_NAMESPACE_RE
|
|
9224
|
+
] }, { match: [/\b(class|module)\s+/, CLASS_NAME_WITH_NAMESPACE_RE] }],
|
|
9225
|
+
scope: {
|
|
9226
|
+
2: "title.class",
|
|
9227
|
+
4: "title.class.inherited"
|
|
9228
|
+
},
|
|
9229
|
+
keywords: RUBY_KEYWORDS
|
|
9230
|
+
},
|
|
9231
|
+
{
|
|
9232
|
+
match: [/(include|extend)\s+/, CLASS_NAME_WITH_NAMESPACE_RE],
|
|
9233
|
+
scope: { 2: "title.class" },
|
|
9234
|
+
keywords: RUBY_KEYWORDS
|
|
9235
|
+
},
|
|
8915
9236
|
{
|
|
8916
9237
|
relevance: 0,
|
|
8917
9238
|
match: [CLASS_NAME_WITH_NAMESPACE_RE, /\.new[. (]/],
|
|
8918
9239
|
scope: { 1: "title.class" }
|
|
8919
9240
|
},
|
|
8920
|
-
|
|
9241
|
+
{
|
|
9242
|
+
relevance: 0,
|
|
9243
|
+
match: /\b[A-Z][A-Z_0-9]+\b/,
|
|
9244
|
+
className: "variable.constant"
|
|
9245
|
+
},
|
|
8921
9246
|
{
|
|
8922
9247
|
relevance: 0,
|
|
8923
9248
|
match: CLASS_NAME_RE,
|
|
8924
9249
|
scope: "title.class"
|
|
8925
9250
|
},
|
|
8926
|
-
|
|
9251
|
+
{
|
|
9252
|
+
match: [
|
|
9253
|
+
/def/,
|
|
9254
|
+
/\s+/,
|
|
9255
|
+
RUBY_METHOD_RE
|
|
9256
|
+
],
|
|
9257
|
+
scope: {
|
|
9258
|
+
1: "keyword",
|
|
9259
|
+
3: "title.function"
|
|
9260
|
+
},
|
|
9261
|
+
contains: [PARAMS]
|
|
9262
|
+
},
|
|
8927
9263
|
{ begin: hljs.IDENT_RE + "::" },
|
|
8928
9264
|
{
|
|
8929
9265
|
className: "symbol",
|
|
@@ -9028,7 +9364,6 @@ function rust(hljs) {
|
|
|
9028
9364
|
relevance: 0,
|
|
9029
9365
|
begin: regex.concat(/\b/, /(?!let|for|while|if|else|match\b)/, IDENT_RE, regex.lookahead(/\s*\(/))
|
|
9030
9366
|
};
|
|
9031
|
-
const NUMBER_SUFFIX = "([ui](8|16|32|64|128|size)|f(32|64))?";
|
|
9032
9367
|
const KEYWORDS = [
|
|
9033
9368
|
"abstract",
|
|
9034
9369
|
"as",
|
|
@@ -9216,10 +9551,10 @@ function rust(hljs) {
|
|
|
9216
9551
|
{
|
|
9217
9552
|
className: "number",
|
|
9218
9553
|
variants: [
|
|
9219
|
-
{ begin: "\\b0b([01_]+)"
|
|
9220
|
-
{ begin: "\\b0o([0-7_]+)"
|
|
9221
|
-
{ begin: "\\b0x([A-Fa-f0-9_]+)"
|
|
9222
|
-
{ begin: "\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"
|
|
9554
|
+
{ begin: "\\b0b([01_]+)([ui](8|16|32|64|128|size)|f(32|64))?" },
|
|
9555
|
+
{ begin: "\\b0o([0-7_]+)([ui](8|16|32|64|128|size)|f(32|64))?" },
|
|
9556
|
+
{ begin: "\\b0x([A-Fa-f0-9_]+)([ui](8|16|32|64|128|size)|f(32|64))?" },
|
|
9557
|
+
{ begin: "\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)([ui](8|16|32|64|128|size)|f(32|64))?" }
|
|
9223
9558
|
],
|
|
9224
9559
|
relevance: 0
|
|
9225
9560
|
},
|
|
@@ -11699,6 +12034,10 @@ function javascript(hljs) {
|
|
|
11699
12034
|
const XML_TAG = {
|
|
11700
12035
|
begin: /<[A-Za-z0-9\\._:-]+/,
|
|
11701
12036
|
end: /\/[A-Za-z0-9\\._:-]+>|\/>/,
|
|
12037
|
+
/**
|
|
12038
|
+
* @param {RegExpMatchArray} match
|
|
12039
|
+
* @param {CallbackResponse} response
|
|
12040
|
+
*/
|
|
11702
12041
|
isTrulyOpeningTag: (match, response) => {
|
|
11703
12042
|
const afterMatchIndex = match[0].length + match.index;
|
|
11704
12043
|
const nextChar = match.input[afterMatchIndex];
|
|
@@ -11812,7 +12151,7 @@ function javascript(hljs) {
|
|
|
11812
12151
|
},
|
|
11813
12152
|
{
|
|
11814
12153
|
className: "variable",
|
|
11815
|
-
begin:
|
|
12154
|
+
begin: "[A-Za-z$_][0-9A-Za-z$_]*(?=\\s*(-)|$)",
|
|
11816
12155
|
endsParent: true,
|
|
11817
12156
|
relevance: 0
|
|
11818
12157
|
},
|
|
@@ -12089,7 +12428,7 @@ function javascript(hljs) {
|
|
|
12089
12428
|
},
|
|
12090
12429
|
PROPERTY_ACCESS,
|
|
12091
12430
|
{
|
|
12092
|
-
match: "\\$"
|
|
12431
|
+
match: "\\$[A-Za-z$_][0-9A-Za-z$_]*",
|
|
12093
12432
|
relevance: 0
|
|
12094
12433
|
},
|
|
12095
12434
|
{
|
|
@@ -12170,7 +12509,7 @@ function typescript(hljs) {
|
|
|
12170
12509
|
};
|
|
12171
12510
|
const DECORATOR = {
|
|
12172
12511
|
className: "meta",
|
|
12173
|
-
begin: "@"
|
|
12512
|
+
begin: "@[A-Za-z$_][0-9A-Za-z$_]*"
|
|
12174
12513
|
};
|
|
12175
12514
|
const swapMode = (mode, label, replacement) => {
|
|
12176
12515
|
const indx = mode.contains.findIndex((m) => m.label === label);
|
|
@@ -12385,7 +12724,6 @@ function xml(hljs) {
|
|
|
12385
12724
|
//#region ../../node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/yaml.js
|
|
12386
12725
|
function yaml(hljs) {
|
|
12387
12726
|
const LITERALS = "true false yes no null";
|
|
12388
|
-
const URI_CHARACTERS = "[\\w#;/?:@&=+$,.~*'()[\\]]+";
|
|
12389
12727
|
const KEY = {
|
|
12390
12728
|
className: "attr",
|
|
12391
12729
|
variants: [
|
|
@@ -12485,19 +12823,19 @@ function yaml(hljs) {
|
|
|
12485
12823
|
},
|
|
12486
12824
|
{
|
|
12487
12825
|
className: "type",
|
|
12488
|
-
begin: "!\\w+!"
|
|
12826
|
+
begin: "!\\w+![\\w#;/?:@&=+$,.~*'()[\\]]+"
|
|
12489
12827
|
},
|
|
12490
12828
|
{
|
|
12491
12829
|
className: "type",
|
|
12492
|
-
begin: "!<"
|
|
12830
|
+
begin: "!<[\\w#;/?:@&=+$,.~*'()[\\]]+>"
|
|
12493
12831
|
},
|
|
12494
12832
|
{
|
|
12495
12833
|
className: "type",
|
|
12496
|
-
begin: "!"
|
|
12834
|
+
begin: "![\\w#;/?:@&=+$,.~*'()[\\]]+"
|
|
12497
12835
|
},
|
|
12498
12836
|
{
|
|
12499
12837
|
className: "type",
|
|
12500
|
-
begin: "!!"
|
|
12838
|
+
begin: "!![\\w#;/?:@&=+$,.~*'()[\\]]+"
|
|
12501
12839
|
},
|
|
12502
12840
|
{
|
|
12503
12841
|
className: "meta",
|
|
@@ -12826,6 +13164,7 @@ var standardLanguages = {
|
|
|
12826
13164
|
java,
|
|
12827
13165
|
javascript: javascript$1,
|
|
12828
13166
|
json,
|
|
13167
|
+
julia,
|
|
12829
13168
|
kotlin,
|
|
12830
13169
|
less,
|
|
12831
13170
|
lua,
|