highlight.js
Advanced tools
Comparing version 11.9.0 to 11.10.0
@@ -5,2 +5,3 @@ /* | ||
Website: https://tools.ietf.org/html/rfc5234 | ||
Category: syntax | ||
Audit: 2020 | ||
@@ -7,0 +8,0 @@ */ |
@@ -11,16 +11,26 @@ /* | ||
function arcade(hljs) { | ||
const regex = hljs.regex; | ||
const IDENT_RE = '[A-Za-z_][0-9A-Za-z_]*'; | ||
const KEYWORDS = { | ||
keyword: [ | ||
"break", | ||
"case", | ||
"catch", | ||
"continue", | ||
"debugger", | ||
"do", | ||
"else", | ||
"export", | ||
"for", | ||
"function", | ||
"if", | ||
"for", | ||
"while", | ||
"var", | ||
"import", | ||
"in", | ||
"new", | ||
"function", | ||
"do", | ||
"return", | ||
"switch", | ||
"try", | ||
"var", | ||
"void", | ||
"else", | ||
"break" | ||
"while" | ||
], | ||
@@ -30,3 +40,2 @@ literal: [ | ||
"DoubleQuote", | ||
"false", | ||
"ForwardSlash", | ||
@@ -36,3 +45,2 @@ "Infinity", | ||
"NewLine", | ||
"null", | ||
"PI", | ||
@@ -42,2 +50,4 @@ "SingleQuote", | ||
"TextFormatting", | ||
"false", | ||
"null", | ||
"true", | ||
@@ -67,2 +77,3 @@ "undefined" | ||
"Centroid", | ||
"ChangeTimeZone", | ||
"Clip", | ||
@@ -74,2 +85,3 @@ "Concatenate", | ||
"ConvertDirection", | ||
"ConvexHull", | ||
"Cos", | ||
@@ -79,5 +91,6 @@ "Count", | ||
"Cut", | ||
"Date", | ||
"Date|0", | ||
"DateAdd", | ||
"DateDiff", | ||
"DateOnly", | ||
"Day", | ||
@@ -109,6 +122,7 @@ "Decode", | ||
"FeatureSetByPortalItem", | ||
"FeatureSetByRelationshipClass", | ||
"FeatureSetByRelationshipName", | ||
"Filter", | ||
"Find", | ||
"First", | ||
"First|0", | ||
"Floor", | ||
@@ -118,13 +132,21 @@ "FromCharCode", | ||
"FromJSON", | ||
"Front", | ||
"GdbVersion", | ||
"Generalize", | ||
"Geometry", | ||
"GetEnvironment", | ||
"GetFeatureSet", | ||
"GetFeatureSetInfo", | ||
"GetUser", | ||
"GroupBy", | ||
"Guid", | ||
"HasKey", | ||
"HasValue", | ||
"Hash", | ||
"HasKey", | ||
"Hour", | ||
"IIf", | ||
"ISOMonth", | ||
"ISOWeek", | ||
"ISOWeekday", | ||
"ISOYear", | ||
"Includes", | ||
@@ -137,6 +159,2 @@ "IndexOf", | ||
"IsNan", | ||
"ISOMonth", | ||
"ISOWeek", | ||
"ISOWeekday", | ||
"ISOYear", | ||
"IsSelfIntersecting", | ||
@@ -160,2 +178,4 @@ "IsSimple", | ||
"Multipoint", | ||
"NearestCoordinate", | ||
"NearestVertex", | ||
"NextSequenceValue", | ||
@@ -165,3 +185,3 @@ "None", | ||
"Number", | ||
"Offset|0", | ||
"Offset", | ||
"OrderBy", | ||
@@ -197,2 +217,3 @@ "Overlaps", | ||
"Sqrt", | ||
"StandardizeGuid", | ||
"Stdev", | ||
@@ -206,11 +227,14 @@ "SubtypeCode", | ||
"Text", | ||
"Time", | ||
"TimeZone", | ||
"TimeZoneOffset", | ||
"Timestamp", | ||
"ToCharCode", | ||
"ToCodePoint", | ||
"Today", | ||
"ToHex", | ||
"ToLocal", | ||
"ToUTC", | ||
"Today", | ||
"Top|0", | ||
"Touches", | ||
"ToUTC", | ||
"TrackAccelerationAt", | ||
@@ -240,10 +264,42 @@ "TrackAccelerationWindow", | ||
"Weekday", | ||
"When", | ||
"When|0", | ||
"Within", | ||
"Year" | ||
"Year|0", | ||
] | ||
}; | ||
const PROFILE_VARS = [ | ||
"aggregatedFeatures", | ||
"analytic", | ||
"config", | ||
"datapoint", | ||
"datastore", | ||
"editcontext", | ||
"feature", | ||
"featureSet", | ||
"feedfeature", | ||
"fencefeature", | ||
"fencenotificationtype", | ||
"join", | ||
"layer", | ||
"locationupdate", | ||
"map", | ||
"measure", | ||
"measure", | ||
"originalFeature", | ||
"record", | ||
"reference", | ||
"rowindex", | ||
"sourcedatastore", | ||
"sourcefeature", | ||
"sourcelayer", | ||
"target", | ||
"targetdatastore", | ||
"targetfeature", | ||
"targetlayer", | ||
"value", | ||
"view" | ||
]; | ||
const SYMBOL = { | ||
className: 'symbol', | ||
begin: '\\$[datastore|feature|layer|map|measure|sourcefeature|sourcelayer|targetfeature|targetlayer|value|view]+' | ||
begin: '\\$' + regex.either(...PROFILE_VARS) | ||
}; | ||
@@ -250,0 +306,0 @@ const NUMBER = { |
@@ -55,5 +55,40 @@ /* | ||
variants: [ | ||
{ begin: '\\b(0b[01\']+)' }, | ||
{ begin: '(-?)\\b([\\d\']+(\\.[\\d\']*)?|\\.[\\d\']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)' }, | ||
{ begin: '(-?)(\\b0[xX][a-fA-F0-9\']+|(\\b[\\d\']+(\\.[\\d\']*)?|\\.[\\d\']+)([eE][-+]?[\\d\']+)?)' } | ||
// Floating-point literal. | ||
{ begin: | ||
"[+-]?(?:" // Leading sign. | ||
// Decimal. | ||
+ "(?:" | ||
+"[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?" | ||
+ "|\\.[0-9](?:'?[0-9])*" | ||
+ ")(?:[Ee][+-]?[0-9](?:'?[0-9])*)?" | ||
+ "|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*" | ||
// Hexadecimal. | ||
+ "|0[Xx](?:" | ||
+"[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?" | ||
+ "|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*" | ||
+ ")[Pp][+-]?[0-9](?:'?[0-9])*" | ||
+ ")(?:" // Literal suffixes. | ||
+ "[Ff](?:16|32|64|128)?" | ||
+ "|(BF|bf)16" | ||
+ "|[Ll]" | ||
+ "|" // Literal suffix is optional. | ||
+ ")" | ||
}, | ||
// Integer literal. | ||
{ begin: | ||
"[+-]?\\b(?:" // Leading sign. | ||
+ "0[Bb][01](?:'?[01])*" // Binary. | ||
+ "|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*" // Hexadecimal. | ||
+ "|0(?:'?[0-7])*" // Octal or just a lone zero. | ||
+ "|[1-9](?:'?[0-9])*" // Decimal. | ||
+ ")(?:" // Literal suffixes. | ||
+ "[Uu](?:LL?|ll?)" | ||
+ "|[Uu][Zz]?" | ||
+ "|(?:LL?|ll?)[Uu]?" | ||
+ "|[Zz][Uu]" | ||
+ "|" // Literal suffix is optional. | ||
+ ")" | ||
// Note: there are user-defined literal suffixes too, but perhaps having the custom suffix not part of the | ||
// literal highlight actually makes it stand out more. | ||
} | ||
], | ||
@@ -574,2 +609,3 @@ relevance: 0 | ||
Website: https://www.arduino.cc | ||
Category: system | ||
*/ | ||
@@ -576,0 +612,0 @@ |
@@ -6,2 +6,3 @@ /* | ||
Description: Syntax Highlighting for the AspectJ Language which is a general-purpose aspect-oriented extension to the Java programming language. | ||
Category: system | ||
Audit: 2020 | ||
@@ -8,0 +9,0 @@ */ |
@@ -6,2 +6,3 @@ /* | ||
Description: language definition for Awk scripts | ||
Category: scripting | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -6,3 +6,3 @@ /* | ||
Website: https://www.gnu.org/software/bash/ | ||
Category: common | ||
Category: common, scripting | ||
*/ | ||
@@ -42,2 +42,14 @@ | ||
}; | ||
const COMMENT = hljs.inherit( | ||
hljs.COMMENT(), | ||
{ | ||
match: [ | ||
/(^|\s)/, | ||
/#.*$/ | ||
], | ||
scope: { | ||
2: 'comment' | ||
} | ||
} | ||
); | ||
const HERE_DOC = { | ||
@@ -176,2 +188,3 @@ begin: /<<-?\s*(?=\w+)/, | ||
"source", | ||
"sudo", | ||
"type", | ||
@@ -362,3 +375,6 @@ "typeset", | ||
name: 'Bash', | ||
aliases: [ 'sh' ], | ||
aliases: [ | ||
'sh', | ||
'zsh' | ||
], | ||
keywords: { | ||
@@ -383,3 +399,3 @@ $pattern: /\b[a-z][a-z0-9._-]+\b/, | ||
ARITHMETIC, | ||
hljs.HASH_COMMENT_MODE, | ||
COMMENT, | ||
HERE_DOC, | ||
@@ -386,0 +402,0 @@ PATH_MODE, |
@@ -6,2 +6,3 @@ /* | ||
Website: https://en.wikipedia.org/wiki/Tandy_1000 | ||
Category: system | ||
*/ | ||
@@ -8,0 +9,0 @@ |
/* | ||
Language: Backus–Naur Form | ||
Website: https://en.wikipedia.org/wiki/Backus–Naur_form | ||
Category: syntax | ||
Author: Oleg Efimov <efimovov@gmail.com> | ||
@@ -5,0 +6,0 @@ */ |
@@ -73,3 +73,3 @@ /* | ||
'if else elif endif define undef warning error line ' | ||
+ 'pragma _Pragma ifdef ifndef include' }, | ||
+ 'pragma _Pragma ifdef ifndef elifdef elifndef include' }, | ||
contains: [ | ||
@@ -118,2 +118,4 @@ { | ||
"sizeof", | ||
"typeof", | ||
"typeof_unqual", | ||
"struct", | ||
@@ -153,2 +155,3 @@ "switch", | ||
"_Bool", | ||
"_BitInt", | ||
"_Complex", | ||
@@ -158,6 +161,17 @@ "_Imaginary", | ||
"_Decimal64", | ||
"_Decimal96", | ||
"_Decimal128", | ||
"_Decimal64x", | ||
"_Decimal128x", | ||
"_Float16", | ||
"_Float32", | ||
"_Float64", | ||
"_Float128", | ||
"_Float32x", | ||
"_Float64x", | ||
"_Float128x", | ||
// modifiers | ||
"const", | ||
"static", | ||
"constexpr", | ||
// aliases | ||
@@ -164,0 +178,0 @@ "complex", |
@@ -6,2 +6,3 @@ /* | ||
Website: https://docs.microsoft.com/en-us/dynamics-nav/programming-in-c-al | ||
Category: enterprise | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -5,2 +5,3 @@ /* | ||
Website: https://ceylon-lang.org | ||
Category: system | ||
*/ | ||
@@ -7,0 +8,0 @@ |
@@ -6,2 +6,3 @@ /* | ||
Website: https://cmake.org | ||
Category: build-system | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -55,5 +55,40 @@ /* | ||
variants: [ | ||
{ begin: '\\b(0b[01\']+)' }, | ||
{ begin: '(-?)\\b([\\d\']+(\\.[\\d\']*)?|\\.[\\d\']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)' }, | ||
{ begin: '(-?)(\\b0[xX][a-fA-F0-9\']+|(\\b[\\d\']+(\\.[\\d\']*)?|\\.[\\d\']+)([eE][-+]?[\\d\']+)?)' } | ||
// Floating-point literal. | ||
{ begin: | ||
"[+-]?(?:" // Leading sign. | ||
// Decimal. | ||
+ "(?:" | ||
+"[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?" | ||
+ "|\\.[0-9](?:'?[0-9])*" | ||
+ ")(?:[Ee][+-]?[0-9](?:'?[0-9])*)?" | ||
+ "|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*" | ||
// Hexadecimal. | ||
+ "|0[Xx](?:" | ||
+"[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?" | ||
+ "|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*" | ||
+ ")[Pp][+-]?[0-9](?:'?[0-9])*" | ||
+ ")(?:" // Literal suffixes. | ||
+ "[Ff](?:16|32|64|128)?" | ||
+ "|(BF|bf)16" | ||
+ "|[Ll]" | ||
+ "|" // Literal suffix is optional. | ||
+ ")" | ||
}, | ||
// Integer literal. | ||
{ begin: | ||
"[+-]?\\b(?:" // Leading sign. | ||
+ "0[Bb][01](?:'?[01])*" // Binary. | ||
+ "|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*" // Hexadecimal. | ||
+ "|0(?:'?[0-7])*" // Octal or just a lone zero. | ||
+ "|[1-9](?:'?[0-9])*" // Decimal. | ||
+ ")(?:" // Literal suffixes. | ||
+ "[Uu](?:LL?|ll?)" | ||
+ "|[Uu][Zz]?" | ||
+ "|(?:LL?|ll?)[Uu]?" | ||
+ "|[Zz][Uu]" | ||
+ "|" // Literal suffix is optional. | ||
+ ")" | ||
// Note: there are user-defined literal suffixes too, but perhaps having the custom suffix not part of the | ||
// literal highlight actually makes it stand out more. | ||
} | ||
], | ||
@@ -60,0 +95,0 @@ relevance: 0 |
@@ -5,2 +5,3 @@ /* | ||
Website: https://crystal-lang.org | ||
Category: system | ||
*/ | ||
@@ -7,0 +8,0 @@ |
@@ -167,2 +167,7 @@ /* | ||
}; | ||
const RAW_STRING = { | ||
className: 'string', | ||
begin: /"""("*)(?!")(.|\n)*?"""\1/, | ||
relevance: 1 | ||
}; | ||
const VERBATIM_STRING = { | ||
@@ -233,2 +238,3 @@ className: 'string', | ||
const STRING = { variants: [ | ||
RAW_STRING, | ||
INTERPOLATED_VERBATIM_STRING, | ||
@@ -235,0 +241,0 @@ INTERPOLATED_STRING, |
@@ -6,2 +6,3 @@ /* | ||
Website: https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP | ||
Category: web | ||
@@ -8,0 +9,0 @@ vim: ts=2 sw=2 st=2 |
@@ -46,3 +46,3 @@ const MODES = (hljs) => { | ||
const TAGS = [ | ||
const HTML_TAGS = [ | ||
'a', | ||
@@ -99,3 +99,6 @@ 'abbr', | ||
'ol', | ||
'optgroup', | ||
'option', | ||
'p', | ||
'picture', | ||
'q', | ||
@@ -105,2 +108,4 @@ 'quote', | ||
'section', | ||
'select', | ||
'source', | ||
'span', | ||
@@ -124,2 +129,54 @@ 'strong', | ||
const SVG_TAGS = [ | ||
'defs', | ||
'g', | ||
'marker', | ||
'mask', | ||
'pattern', | ||
'svg', | ||
'switch', | ||
'symbol', | ||
'feBlend', | ||
'feColorMatrix', | ||
'feComponentTransfer', | ||
'feComposite', | ||
'feConvolveMatrix', | ||
'feDiffuseLighting', | ||
'feDisplacementMap', | ||
'feFlood', | ||
'feGaussianBlur', | ||
'feImage', | ||
'feMerge', | ||
'feMorphology', | ||
'feOffset', | ||
'feSpecularLighting', | ||
'feTile', | ||
'feTurbulence', | ||
'linearGradient', | ||
'radialGradient', | ||
'stop', | ||
'circle', | ||
'ellipse', | ||
'image', | ||
'line', | ||
'path', | ||
'polygon', | ||
'polyline', | ||
'rect', | ||
'text', | ||
'use', | ||
'textPath', | ||
'tspan', | ||
'foreignObject', | ||
'clipPath' | ||
]; | ||
const TAGS = [ | ||
...HTML_TAGS, | ||
...SVG_TAGS, | ||
]; | ||
// Sorting, then reversing makes sure longer attributes/elements like | ||
// `font-weight` are matched fully instead of getting false positives on say `font` | ||
const MEDIA_FEATURES = [ | ||
@@ -160,3 +217,3 @@ 'any-hover', | ||
'max-height' | ||
]; | ||
].sort().reverse(); | ||
@@ -224,3 +281,3 @@ // https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes | ||
'where' // where() | ||
]; | ||
].sort().reverse(); | ||
@@ -243,8 +300,10 @@ // https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-elements | ||
'spelling-error' | ||
]; | ||
].sort().reverse(); | ||
const ATTRIBUTES = [ | ||
'accent-color', | ||
'align-content', | ||
'align-items', | ||
'align-self', | ||
'alignment-baseline', | ||
'all', | ||
@@ -260,2 +319,3 @@ 'animation', | ||
'animation-timing-function', | ||
'appearance', | ||
'backface-visibility', | ||
@@ -272,2 +332,3 @@ 'background', | ||
'background-size', | ||
'baseline-shift', | ||
'block-size', | ||
@@ -319,2 +380,4 @@ 'border', | ||
'border-right', | ||
'border-end-end-radius', | ||
'border-end-start-radius', | ||
'border-right-color', | ||
@@ -324,2 +387,4 @@ 'border-right-style', | ||
'border-spacing', | ||
'border-start-end-radius', | ||
'border-start-start-radius', | ||
'border-style', | ||
@@ -340,2 +405,4 @@ 'border-top', | ||
'break-inside', | ||
'cx', | ||
'cy', | ||
'caption-side', | ||
@@ -348,2 +415,7 @@ 'caret-color', | ||
'color', | ||
'color-interpolation', | ||
'color-interpolation-filters', | ||
'color-profile', | ||
'color-rendering', | ||
'color-scheme', | ||
'column-count', | ||
@@ -370,3 +442,8 @@ 'column-fill', | ||
'display', | ||
'dominant-baseline', | ||
'empty-cells', | ||
'enable-background', | ||
'fill', | ||
'fill-opacity', | ||
'fill-rule', | ||
'filter', | ||
@@ -382,2 +459,4 @@ 'flex', | ||
'flow', | ||
'flood-color', | ||
'flood-opacity', | ||
'font', | ||
@@ -404,2 +483,3 @@ 'font-display', | ||
'gap', | ||
'glyph-orientation-horizontal', | ||
'glyph-orientation-vertical', | ||
@@ -431,6 +511,17 @@ 'grid', | ||
'inline-size', | ||
'inset', | ||
'inset-block', | ||
'inset-block-end', | ||
'inset-block-start', | ||
'inset-inline', | ||
'inset-inline-end', | ||
'inset-inline-start', | ||
'isolation', | ||
'kerning', | ||
'justify-content', | ||
'justify-items', | ||
'justify-self', | ||
'left', | ||
'letter-spacing', | ||
'lighting-color', | ||
'line-break', | ||
@@ -442,2 +533,7 @@ 'line-height', | ||
'list-style-type', | ||
'marker', | ||
'marker-end', | ||
'marker-mid', | ||
'marker-start', | ||
'mask', | ||
'margin', | ||
@@ -524,2 +620,3 @@ 'margin-block', | ||
'quotes', | ||
'r', | ||
'resize', | ||
@@ -530,3 +627,5 @@ 'rest', | ||
'right', | ||
'rotate', | ||
'row-gap', | ||
'scale', | ||
'scroll-margin', | ||
@@ -563,2 +662,13 @@ 'scroll-margin-block', | ||
'shape-outside', | ||
'shape-rendering', | ||
'stop-color', | ||
'stop-opacity', | ||
'stroke', | ||
'stroke-dasharray', | ||
'stroke-dashoffset', | ||
'stroke-linecap', | ||
'stroke-linejoin', | ||
'stroke-miterlimit', | ||
'stroke-opacity', | ||
'stroke-width', | ||
'speak', | ||
@@ -569,2 +679,3 @@ 'speak-as', | ||
'table-layout', | ||
'text-anchor', | ||
'text-align', | ||
@@ -577,3 +688,5 @@ 'text-align-all', | ||
'text-decoration-line', | ||
'text-decoration-skip-ink', | ||
'text-decoration-style', | ||
'text-decoration-thickness', | ||
'text-emphasis', | ||
@@ -590,2 +703,3 @@ 'text-emphasis-color', | ||
'text-transform', | ||
'text-underline-offset', | ||
'text-underline-position', | ||
@@ -602,3 +716,5 @@ 'top', | ||
'transition-timing-function', | ||
'translate', | ||
'unicode-bidi', | ||
'vector-effect', | ||
'vertical-align', | ||
@@ -622,6 +738,6 @@ 'visibility', | ||
'writing-mode', | ||
'x', | ||
'y', | ||
'z-index' | ||
// reverse makes sure longer attributes `font-weight` are matched fully | ||
// instead of getting false positives on say `font` | ||
].reverse(); | ||
].sort().reverse(); | ||
@@ -628,0 +744,0 @@ /* |
@@ -7,2 +7,3 @@ /* | ||
Website: https://dlang.org | ||
Category: system | ||
Date: 2012-04-08 | ||
@@ -9,0 +10,0 @@ */ |
/* | ||
Language: Delphi | ||
Website: https://www.embarcadero.com/products/delphi | ||
Category: system | ||
*/ | ||
@@ -167,10 +168,21 @@ | ||
{ | ||
// Regular numbers, e.g., 123, 123.456. | ||
match: /\b\d[\d_]*(\.\d[\d_]*)?/ }, | ||
{ | ||
// Hexadecimal notation, e.g., $7F. | ||
begin: '\\$[0-9A-Fa-f]+' }, | ||
match: /\$[\dA-Fa-f_]+/ }, | ||
{ | ||
// Hexadecimal literal with no digits | ||
match: /\$/, | ||
relevance: 0 }, | ||
{ | ||
// Octal notation, e.g., &42. | ||
begin: '&[0-7]+' }, | ||
match: /&[0-7][0-7_]*/ }, | ||
{ | ||
// Binary notation, e.g., %1010. | ||
begin: '%[01]+' } | ||
match: /%[01_]+/ }, | ||
{ | ||
// Binary literal with no digits | ||
match: /%/, | ||
relevance: 0 } | ||
] | ||
@@ -180,3 +192,8 @@ }; | ||
className: 'string', | ||
begin: /(#\d+)+/ | ||
variants: [ | ||
{ match: /#\d[\d_]*/ }, | ||
{ match: /#\$[\dA-Fa-f][\dA-Fa-f_]*/ }, | ||
{ match: /#&[0-7][0-7_]*/ }, | ||
{ match: /#%[01][01_]*/ } | ||
] | ||
}; | ||
@@ -223,3 +240,2 @@ const CLASS = { | ||
CHAR_STRING, | ||
hljs.NUMBER_MODE, | ||
NUMBER, | ||
@@ -226,0 +242,0 @@ CLASS, |
@@ -6,2 +6,3 @@ /* | ||
Website: https://en.wikipedia.org/wiki/Batch_file | ||
Category: scripting | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -5,2 +5,3 @@ /* | ||
Website: https://en.wikipedia.org/wiki/Extended_Backus–Naur_form | ||
Category: syntax | ||
*/ | ||
@@ -7,0 +8,0 @@ |
@@ -79,2 +79,6 @@ /* | ||
}; | ||
const CHAR_LITERAL = { | ||
scope: 'string', | ||
match: /\$(\\([^0-9]|[0-9]{1,3}|)|.)/, | ||
}; | ||
@@ -97,3 +101,4 @@ const BLOCK_STATEMENTS = { | ||
VAR2, | ||
RECORD_ACCESS | ||
RECORD_ACCESS, | ||
CHAR_LITERAL | ||
]; | ||
@@ -111,3 +116,4 @@ | ||
VAR2, | ||
RECORD_ACCESS | ||
RECORD_ACCESS, | ||
CHAR_LITERAL | ||
]; | ||
@@ -148,2 +154,3 @@ FUNCTION_CALL.contains[1].contains = BASIC_MODES; | ||
}; | ||
return { | ||
@@ -190,2 +197,3 @@ name: 'Erlang', | ||
TUPLE, | ||
CHAR_LITERAL, | ||
{ begin: /\.$/ } // relevance booster | ||
@@ -192,0 +200,0 @@ ] |
@@ -6,2 +6,3 @@ /* | ||
Website: https://products.office.com/en-us/excel/ | ||
Category: enterprise | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -553,2 +553,3 @@ /* | ||
keywords: { | ||
$pattern: /\b[a-z][a-z0-9_]+\b|\.[a-z][a-z0-9_]+\./, | ||
keyword: KEYWORDS, | ||
@@ -555,0 +556,0 @@ literal: LITERALS, |
@@ -197,3 +197,3 @@ /* | ||
}, | ||
inherits || {} | ||
{} | ||
); | ||
@@ -200,0 +200,0 @@ mode.contains.push(FUNCTION_DEF); |
@@ -6,2 +6,3 @@ /* | ||
Website: https://www.sis.se/api/document/preview/911952/ | ||
Category: hardware | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -112,6 +112,21 @@ /* | ||
{ | ||
begin: hljs.C_NUMBER_RE + '[i]', | ||
relevance: 1 | ||
match: /-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/, // hex without a present digit before . (making a digit afterwards required) | ||
relevance: 0 | ||
}, | ||
hljs.C_NUMBER_MODE | ||
{ | ||
match: /-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/, // hex with a present digit before . (making a digit afterwards optional) | ||
relevance: 0 | ||
}, | ||
{ | ||
match: /-?\b0[oO](_?[0-7])*i?/, // leading 0o octal | ||
relevance: 0 | ||
}, | ||
{ | ||
match: /-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/, // decimal without a present digit before . (making a digit afterwards required) | ||
relevance: 0 | ||
}, | ||
{ | ||
match: /-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/, // decimal with a present digit before . (making a digit afterwards optional) | ||
relevance: 0 | ||
} | ||
] | ||
@@ -118,0 +133,0 @@ }, |
@@ -6,2 +6,3 @@ /* | ||
Website: http://golo-lang.org/ | ||
Category: system | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -6,2 +6,3 @@ /* | ||
Author: Damian Mee <mee.damian@gmail.com> | ||
Category: build-system | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -6,2 +6,3 @@ /* | ||
Website: https://groovy-lang.org | ||
Category: system | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -7,2 +7,3 @@ /* | ||
Website: https://haxe.org | ||
Category: system | ||
*/ | ||
@@ -91,3 +92,3 @@ | ||
className: 'type', // instantiation | ||
begin: /new */, | ||
beginKeywords: 'new', | ||
end: /\W/, | ||
@@ -94,0 +95,0 @@ excludeBegin: true, |
@@ -6,2 +6,3 @@ /* | ||
Website: http://inform7.com | ||
Category: gaming | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -111,3 +111,4 @@ // https://docs.oracle.com/javase/specs/jls/se15/html/jls-3.html#jls-3.10 | ||
'yield', | ||
'permits' | ||
'permits', | ||
'goto' | ||
]; | ||
@@ -114,0 +115,0 @@ |
@@ -293,3 +293,3 @@ const IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*'; | ||
const HTML_TEMPLATE = { | ||
begin: 'html`', | ||
begin: '\.?html`', | ||
end: '', | ||
@@ -307,3 +307,3 @@ starts: { | ||
const CSS_TEMPLATE = { | ||
begin: 'css`', | ||
begin: '\.?css`', | ||
end: '', | ||
@@ -321,3 +321,3 @@ starts: { | ||
const GRAPHQL_TEMPLATE = { | ||
begin: 'gql`', | ||
begin: '\.?gql`', | ||
end: '', | ||
@@ -419,3 +419,3 @@ starts: { | ||
{ | ||
begin: /\(/, | ||
begin: /(\s*)\(/, | ||
end: /\)/, | ||
@@ -428,3 +428,4 @@ keywords: KEYWORDS$1, | ||
className: 'params', | ||
begin: /\(/, | ||
// convert this to negative lookbehind in v12 | ||
begin: /(\s*)\(/, // to match the parms with | ||
end: /\)/, | ||
@@ -552,4 +553,4 @@ excludeBegin: true, | ||
"import" | ||
]), | ||
IDENT_RE$1, regex.lookahead(/\(/)), | ||
].map(x => `${x}\\s*\\(`)), | ||
IDENT_RE$1, regex.lookahead(/\s*\(/)), | ||
className: "title.function", | ||
@@ -675,3 +676,3 @@ relevance: 0 | ||
{ | ||
begin: /\(/, | ||
begin: /(\s*)\(/, | ||
end: /\)/, | ||
@@ -678,0 +679,0 @@ excludeBegin: true, |
@@ -37,2 +37,3 @@ /* | ||
name: 'JSON', | ||
aliases: ['jsonc'], | ||
keywords:{ | ||
@@ -39,0 +40,0 @@ literal: LITERALS, |
@@ -7,2 +7,3 @@ /* | ||
Requires: julia.js | ||
Category: scientific | ||
@@ -9,0 +10,0 @@ The Julia REPL code blocks look something like the following: |
@@ -7,2 +7,3 @@ /* | ||
Website: https://julialang.org | ||
Category: scientific | ||
*/ | ||
@@ -9,0 +10,0 @@ |
@@ -6,2 +6,3 @@ /* | ||
Website: http://www.lassosoft.com/What-Is-Lasso | ||
Category: database, web | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -46,3 +46,3 @@ const MODES = (hljs) => { | ||
const TAGS = [ | ||
const HTML_TAGS = [ | ||
'a', | ||
@@ -99,3 +99,6 @@ 'abbr', | ||
'ol', | ||
'optgroup', | ||
'option', | ||
'p', | ||
'picture', | ||
'q', | ||
@@ -105,2 +108,4 @@ 'quote', | ||
'section', | ||
'select', | ||
'source', | ||
'span', | ||
@@ -124,2 +129,54 @@ 'strong', | ||
const SVG_TAGS = [ | ||
'defs', | ||
'g', | ||
'marker', | ||
'mask', | ||
'pattern', | ||
'svg', | ||
'switch', | ||
'symbol', | ||
'feBlend', | ||
'feColorMatrix', | ||
'feComponentTransfer', | ||
'feComposite', | ||
'feConvolveMatrix', | ||
'feDiffuseLighting', | ||
'feDisplacementMap', | ||
'feFlood', | ||
'feGaussianBlur', | ||
'feImage', | ||
'feMerge', | ||
'feMorphology', | ||
'feOffset', | ||
'feSpecularLighting', | ||
'feTile', | ||
'feTurbulence', | ||
'linearGradient', | ||
'radialGradient', | ||
'stop', | ||
'circle', | ||
'ellipse', | ||
'image', | ||
'line', | ||
'path', | ||
'polygon', | ||
'polyline', | ||
'rect', | ||
'text', | ||
'use', | ||
'textPath', | ||
'tspan', | ||
'foreignObject', | ||
'clipPath' | ||
]; | ||
const TAGS = [ | ||
...HTML_TAGS, | ||
...SVG_TAGS, | ||
]; | ||
// Sorting, then reversing makes sure longer attributes/elements like | ||
// `font-weight` are matched fully instead of getting false positives on say `font` | ||
const MEDIA_FEATURES = [ | ||
@@ -160,3 +217,3 @@ 'any-hover', | ||
'max-height' | ||
]; | ||
].sort().reverse(); | ||
@@ -224,3 +281,3 @@ // https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes | ||
'where' // where() | ||
]; | ||
].sort().reverse(); | ||
@@ -243,8 +300,10 @@ // https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-elements | ||
'spelling-error' | ||
]; | ||
].sort().reverse(); | ||
const ATTRIBUTES = [ | ||
'accent-color', | ||
'align-content', | ||
'align-items', | ||
'align-self', | ||
'alignment-baseline', | ||
'all', | ||
@@ -260,2 +319,3 @@ 'animation', | ||
'animation-timing-function', | ||
'appearance', | ||
'backface-visibility', | ||
@@ -272,2 +332,3 @@ 'background', | ||
'background-size', | ||
'baseline-shift', | ||
'block-size', | ||
@@ -319,2 +380,4 @@ 'border', | ||
'border-right', | ||
'border-end-end-radius', | ||
'border-end-start-radius', | ||
'border-right-color', | ||
@@ -324,2 +387,4 @@ 'border-right-style', | ||
'border-spacing', | ||
'border-start-end-radius', | ||
'border-start-start-radius', | ||
'border-style', | ||
@@ -340,2 +405,4 @@ 'border-top', | ||
'break-inside', | ||
'cx', | ||
'cy', | ||
'caption-side', | ||
@@ -348,2 +415,7 @@ 'caret-color', | ||
'color', | ||
'color-interpolation', | ||
'color-interpolation-filters', | ||
'color-profile', | ||
'color-rendering', | ||
'color-scheme', | ||
'column-count', | ||
@@ -370,3 +442,8 @@ 'column-fill', | ||
'display', | ||
'dominant-baseline', | ||
'empty-cells', | ||
'enable-background', | ||
'fill', | ||
'fill-opacity', | ||
'fill-rule', | ||
'filter', | ||
@@ -382,2 +459,4 @@ 'flex', | ||
'flow', | ||
'flood-color', | ||
'flood-opacity', | ||
'font', | ||
@@ -404,2 +483,3 @@ 'font-display', | ||
'gap', | ||
'glyph-orientation-horizontal', | ||
'glyph-orientation-vertical', | ||
@@ -431,6 +511,17 @@ 'grid', | ||
'inline-size', | ||
'inset', | ||
'inset-block', | ||
'inset-block-end', | ||
'inset-block-start', | ||
'inset-inline', | ||
'inset-inline-end', | ||
'inset-inline-start', | ||
'isolation', | ||
'kerning', | ||
'justify-content', | ||
'justify-items', | ||
'justify-self', | ||
'left', | ||
'letter-spacing', | ||
'lighting-color', | ||
'line-break', | ||
@@ -442,2 +533,7 @@ 'line-height', | ||
'list-style-type', | ||
'marker', | ||
'marker-end', | ||
'marker-mid', | ||
'marker-start', | ||
'mask', | ||
'margin', | ||
@@ -524,2 +620,3 @@ 'margin-block', | ||
'quotes', | ||
'r', | ||
'resize', | ||
@@ -530,3 +627,5 @@ 'rest', | ||
'right', | ||
'rotate', | ||
'row-gap', | ||
'scale', | ||
'scroll-margin', | ||
@@ -563,2 +662,13 @@ 'scroll-margin-block', | ||
'shape-outside', | ||
'shape-rendering', | ||
'stop-color', | ||
'stop-opacity', | ||
'stroke', | ||
'stroke-dasharray', | ||
'stroke-dashoffset', | ||
'stroke-linecap', | ||
'stroke-linejoin', | ||
'stroke-miterlimit', | ||
'stroke-opacity', | ||
'stroke-width', | ||
'speak', | ||
@@ -569,2 +679,3 @@ 'speak-as', | ||
'table-layout', | ||
'text-anchor', | ||
'text-align', | ||
@@ -577,3 +688,5 @@ 'text-align-all', | ||
'text-decoration-line', | ||
'text-decoration-skip-ink', | ||
'text-decoration-style', | ||
'text-decoration-thickness', | ||
'text-emphasis', | ||
@@ -590,2 +703,3 @@ 'text-emphasis-color', | ||
'text-transform', | ||
'text-underline-offset', | ||
'text-underline-position', | ||
@@ -602,3 +716,5 @@ 'top', | ||
'transition-timing-function', | ||
'translate', | ||
'unicode-bidi', | ||
'vector-effect', | ||
'vertical-align', | ||
@@ -622,9 +738,9 @@ 'visibility', | ||
'writing-mode', | ||
'x', | ||
'y', | ||
'z-index' | ||
// reverse makes sure longer attributes `font-weight` are matched fully | ||
// instead of getting false positives on say `font` | ||
].reverse(); | ||
].sort().reverse(); | ||
// some grammars use them all as a single group | ||
const PSEUDO_SELECTORS = PSEUDO_CLASSES.concat(PSEUDO_ELEMENTS); | ||
const PSEUDO_SELECTORS = PSEUDO_CLASSES.concat(PSEUDO_ELEMENTS).sort().reverse(); | ||
@@ -631,0 +747,0 @@ /* |
@@ -66,40 +66,43 @@ /* | ||
// TODO: split into different categories of keywords | ||
keywords: | ||
'begin end true false declare define global ' | ||
+ 'constant private linker_private internal ' | ||
+ 'available_externally linkonce linkonce_odr weak ' | ||
+ 'weak_odr appending dllimport dllexport common ' | ||
+ 'default hidden protected extern_weak external ' | ||
+ 'thread_local zeroinitializer undef null to tail ' | ||
+ 'target triple datalayout volatile nuw nsw nnan ' | ||
+ 'ninf nsz arcp fast exact inbounds align ' | ||
+ 'addrspace section alias module asm sideeffect ' | ||
+ 'gc dbg linker_private_weak attributes blockaddress ' | ||
+ 'initialexec localdynamic localexec prefix unnamed_addr ' | ||
+ 'ccc fastcc coldcc x86_stdcallcc x86_fastcallcc ' | ||
+ 'arm_apcscc arm_aapcscc arm_aapcs_vfpcc ptx_device ' | ||
+ 'ptx_kernel intel_ocl_bicc msp430_intrcc spir_func ' | ||
+ 'spir_kernel x86_64_sysvcc x86_64_win64cc x86_thiscallcc ' | ||
+ 'cc c signext zeroext inreg sret nounwind ' | ||
+ 'noreturn noalias nocapture byval nest readnone ' | ||
+ 'readonly inlinehint noinline alwaysinline optsize ssp ' | ||
+ 'sspreq noredzone noimplicitfloat naked builtin cold ' | ||
+ 'nobuiltin noduplicate nonlazybind optnone returns_twice ' | ||
+ 'sanitize_address sanitize_memory sanitize_thread sspstrong ' | ||
+ 'uwtable returned type opaque eq ne slt sgt ' | ||
+ 'sle sge ult ugt ule uge oeq one olt ogt ' | ||
+ 'ole oge ord uno ueq une x acq_rel acquire ' | ||
+ 'alignstack atomic catch cleanup filter inteldialect ' | ||
+ 'max min monotonic nand personality release seq_cst ' | ||
+ 'singlethread umax umin unordered xchg add fadd ' | ||
+ 'sub fsub mul fmul udiv sdiv fdiv urem srem ' | ||
+ 'frem shl lshr ashr and or xor icmp fcmp ' | ||
+ 'phi call trunc zext sext fptrunc fpext uitofp ' | ||
+ 'sitofp fptoui fptosi inttoptr ptrtoint bitcast ' | ||
+ 'addrspacecast select va_arg ret br switch invoke ' | ||
+ 'unwind unreachable indirectbr landingpad resume ' | ||
+ 'malloc alloca free load store getelementptr ' | ||
+ 'extractelement insertelement shufflevector getresult ' | ||
+ 'extractvalue insertvalue atomicrmw cmpxchg fence ' | ||
+ 'argmemonly double', | ||
keywords: { | ||
keyword: 'begin end true false declare define global ' | ||
+ 'constant private linker_private internal ' | ||
+ 'available_externally linkonce linkonce_odr weak ' | ||
+ 'weak_odr appending dllimport dllexport common ' | ||
+ 'default hidden protected extern_weak external ' | ||
+ 'thread_local zeroinitializer undef null to tail ' | ||
+ 'target triple datalayout volatile nuw nsw nnan ' | ||
+ 'ninf nsz arcp fast exact inbounds align ' | ||
+ 'addrspace section alias module asm sideeffect ' | ||
+ 'gc dbg linker_private_weak attributes blockaddress ' | ||
+ 'initialexec localdynamic localexec prefix unnamed_addr ' | ||
+ 'ccc fastcc coldcc x86_stdcallcc x86_fastcallcc ' | ||
+ 'arm_apcscc arm_aapcscc arm_aapcs_vfpcc ptx_device ' | ||
+ 'ptx_kernel intel_ocl_bicc msp430_intrcc spir_func ' | ||
+ 'spir_kernel x86_64_sysvcc x86_64_win64cc x86_thiscallcc ' | ||
+ 'cc c signext zeroext inreg sret nounwind ' | ||
+ 'noreturn noalias nocapture byval nest readnone ' | ||
+ 'readonly inlinehint noinline alwaysinline optsize ssp ' | ||
+ 'sspreq noredzone noimplicitfloat naked builtin cold ' | ||
+ 'nobuiltin noduplicate nonlazybind optnone returns_twice ' | ||
+ 'sanitize_address sanitize_memory sanitize_thread sspstrong ' | ||
+ 'uwtable returned type opaque eq ne slt sgt ' | ||
+ 'sle sge ult ugt ule uge oeq one olt ogt ' | ||
+ 'ole oge ord uno ueq une x acq_rel acquire ' | ||
+ 'alignstack atomic catch cleanup filter inteldialect ' | ||
+ 'max min monotonic nand personality release seq_cst ' | ||
+ 'singlethread umax umin unordered xchg add fadd ' | ||
+ 'sub fsub mul fmul udiv sdiv fdiv urem srem ' | ||
+ 'frem shl lshr ashr and or xor icmp fcmp ' | ||
+ 'phi call trunc zext sext fptrunc fpext uitofp ' | ||
+ 'sitofp fptoui fptosi inttoptr ptrtoint bitcast ' | ||
+ 'addrspacecast select va_arg ret br switch invoke ' | ||
+ 'unwind unreachable indirectbr landingpad resume ' | ||
+ 'malloc alloca free load store getelementptr ' | ||
+ 'extractelement insertelement shufflevector getresult ' | ||
+ 'extractvalue insertvalue atomicrmw cmpxchg fence ' | ||
+ 'argmemonly', | ||
type: 'void half bfloat float double fp128 x86_fp80 ppc_fp128 ' | ||
+ 'x86_amx x86_mmx ptr label token metadata opaque' | ||
}, | ||
contains: [ | ||
@@ -106,0 +109,0 @@ TYPE, |
@@ -5,3 +5,3 @@ /* | ||
Author: Andrew Fedorov <dmmdrs@mail.ru> | ||
Category: common, scripting | ||
Category: common, gaming, scripting | ||
Website: https://www.lua.org | ||
@@ -8,0 +8,0 @@ */ |
@@ -6,3 +6,3 @@ /* | ||
Website: https://www.gnu.org/software/make/manual/html_node/Introduction.html | ||
Category: common | ||
Category: common, build-system | ||
*/ | ||
@@ -9,0 +9,0 @@ |
@@ -219,2 +219,8 @@ /* | ||
const ENTITY = { | ||
//https://spec.commonmark.org/0.31.2/#entity-references | ||
scope: 'literal', | ||
match: /&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/ | ||
}; | ||
return { | ||
@@ -237,3 +243,4 @@ name: 'Markdown', | ||
LINK, | ||
LINK_REFERENCE | ||
LINK_REFERENCE, | ||
ENTITY | ||
] | ||
@@ -240,0 +247,0 @@ }; |
@@ -6,2 +6,3 @@ /* | ||
Website: https://www.mercurylang.org | ||
Category: functional | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -6,2 +6,3 @@ /* | ||
Website: https://blitzresearch.itch.io/monkey2 | ||
Category: gaming | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -7,2 +7,3 @@ /* | ||
Website: https://www.couchbase.com/products/n1ql | ||
Category: database | ||
*/ | ||
@@ -9,0 +10,0 @@ |
@@ -6,2 +6,3 @@ /* | ||
Website: http://nixos.org/nix | ||
Category: system | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -6,2 +6,3 @@ /* | ||
Website: https://nsis.sourceforge.io/Main_Page | ||
Category: scripting | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -6,2 +6,3 @@ /* | ||
Website: https://www.elementscompiler.com/elements/default.aspx | ||
Category: build-system | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -29,2 +29,3 @@ /* | ||
'chroot', | ||
'class', | ||
'close', | ||
@@ -59,2 +60,3 @@ 'closedir', | ||
'fcntl', | ||
'field', | ||
'fileno', | ||
@@ -119,2 +121,3 @@ 'flock', | ||
'map', | ||
'method', | ||
'mkdir', | ||
@@ -264,15 +267,41 @@ 'msgctl', | ||
}; | ||
const VAR = { variants: [ | ||
{ begin: /\$\d/ }, | ||
{ begin: regex.concat( | ||
/[$%@](\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/, | ||
// negative look-ahead tries to avoid matching patterns that are not | ||
// Perl at all like $ident$, @ident@, etc. | ||
`(?![A-Za-z])(?![@$%])` | ||
) }, | ||
{ | ||
begin: /[$%@][^\s\w{]/, | ||
relevance: 0 | ||
} | ||
] }; | ||
const ATTR = { | ||
scope: 'attr', | ||
match: /\s+:\s*\w+(\s*\(.*?\))?/, | ||
}; | ||
const VAR = { | ||
scope: 'variable', | ||
variants: [ | ||
{ begin: /\$\d/ }, | ||
{ begin: regex.concat( | ||
/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/, | ||
// negative look-ahead tries to avoid matching patterns that are not | ||
// Perl at all like $ident$, @ident@, etc. | ||
`(?![A-Za-z])(?![@$%])` | ||
) | ||
}, | ||
{ | ||
// Only $= is a special Perl variable and one can't declare @= or %=. | ||
begin: /[$%@](?!")[^\s\w{=]|\$=/, | ||
relevance: 0 | ||
} | ||
], | ||
contains: [ ATTR ], | ||
}; | ||
const NUMBER = { | ||
className: 'number', | ||
variants: [ | ||
// decimal numbers: | ||
// include the case where a number starts with a dot (eg. .9), and | ||
// the leading 0? avoids mixing the first and second match on 0.x cases | ||
{ match: /0?\.[0-9][0-9_]+\b/ }, | ||
// include the special versioned number (eg. v5.38) | ||
{ match: /\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/ }, | ||
// non-decimal numbers: | ||
{ match: /\b0[0-7][0-7_]*\b/ }, | ||
{ match: /\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/ }, | ||
{ match: /\b0b[0-1][0-1_]*\b/ }, | ||
], | ||
relevance: 0 | ||
}; | ||
const STRING_CONTAINS = [ | ||
@@ -392,7 +421,3 @@ hljs.BACKSLASH_ESCAPE, | ||
}, | ||
{ | ||
className: 'number', | ||
begin: '(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b', | ||
relevance: 0 | ||
}, | ||
NUMBER, | ||
{ // regexp container | ||
@@ -439,9 +464,17 @@ begin: '(\\/\\/|' + hljs.RE_STARTERS_RE + '|\\b(split|return|print|reverse|grep)\\b)\\s*', | ||
className: 'function', | ||
beginKeywords: 'sub', | ||
beginKeywords: 'sub method', | ||
end: '(\\s*\\(.*?\\))?[;{]', | ||
excludeEnd: true, | ||
relevance: 5, | ||
contains: [ hljs.TITLE_MODE ] | ||
contains: [ hljs.TITLE_MODE, ATTR ] | ||
}, | ||
{ | ||
className: 'class', | ||
beginKeywords: 'class', | ||
end: '[;{]', | ||
excludeEnd: true, | ||
relevance: 5, | ||
contains: [ hljs.TITLE_MODE, ATTR, NUMBER ] | ||
}, | ||
{ | ||
begin: '-\\w\\b', | ||
@@ -448,0 +481,0 @@ relevance: 0 |
@@ -17,2 +17,3 @@ /* | ||
some names highlighted while others not looks ugly. | ||
Category: database | ||
*/ | ||
@@ -19,0 +20,0 @@ |
@@ -7,2 +7,3 @@ /* | ||
Website: https://www.ponylang.io | ||
Category: system | ||
*/ | ||
@@ -9,0 +10,0 @@ |
@@ -7,2 +7,3 @@ /* | ||
Website: https://docs.microsoft.com/en-us/powershell/ | ||
Category: scripting | ||
*/ | ||
@@ -9,0 +10,0 @@ |
@@ -6,2 +6,3 @@ /* | ||
Website: https://en.wikipedia.org/wiki/Prolog | ||
Category: functional | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -7,2 +7,3 @@ /* | ||
Website: https://www.purebasic.com | ||
Category: system | ||
*/ | ||
@@ -9,0 +10,0 @@ |
@@ -376,3 +376,4 @@ /* | ||
// very common convention | ||
begin: /\bself\b/ | ||
scope: 'variable.language', | ||
match: /\bself\b/ | ||
}, | ||
@@ -385,2 +386,3 @@ { | ||
}, | ||
{ match: /\bor\b/, scope: "keyword" }, | ||
STRING, | ||
@@ -387,0 +389,0 @@ COMMENT_TYPE, |
@@ -7,2 +7,3 @@ /* | ||
Website: https://kx.com/connect-with-us/developers/ | ||
Category: enterprise, functional, database | ||
*/ | ||
@@ -9,0 +10,0 @@ |
@@ -6,2 +6,3 @@ /* | ||
Website: https://wiki.mikrotik.com/wiki/Manual:Scripting | ||
Category: scripting | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -7,3 +7,3 @@ /* | ||
Contributors: Peter Leonov <gojpeg@yandex.ru>, Vasily Polovnyov <vast@whiteants.net>, Loren Segal <lsegal@soen.ca>, Pascal Hurni <phi@ruby-reactive.org>, Cedric Sohrauer <sohrauer@googlemail.com> | ||
Category: common | ||
Category: common, scripting | ||
*/ | ||
@@ -10,0 +10,0 @@ |
@@ -10,4 +10,11 @@ /* | ||
/** @type LanguageFn */ | ||
function rust(hljs) { | ||
const regex = hljs.regex; | ||
// ============================================ | ||
// Added to support the r# keyword, which is a raw identifier in Rust. | ||
const RAW_IDENTIFIER = /(r#)?/; | ||
const UNDERSCORE_IDENT_RE = regex.concat(RAW_IDENTIFIER, hljs.UNDERSCORE_IDENT_RE); | ||
const IDENT_RE = regex.concat(RAW_IDENTIFIER, hljs.IDENT_RE); | ||
// ============================================ | ||
const FUNCTION_INVOKE = { | ||
@@ -19,3 +26,3 @@ className: "title.function.invoke", | ||
/(?!let|for|while|if|else|match\b)/, | ||
hljs.IDENT_RE, | ||
IDENT_RE, | ||
regex.lookahead(/\s*\(/)) | ||
@@ -69,2 +76,3 @@ }; | ||
"typeof", | ||
"union", | ||
"unsafe", | ||
@@ -222,3 +230,3 @@ "unsized", | ||
/\s+/, | ||
hljs.UNDERSCORE_IDENT_RE | ||
UNDERSCORE_IDENT_RE | ||
], | ||
@@ -238,3 +246,6 @@ className: { | ||
begin: /"/, | ||
end: /"/ | ||
end: /"/, | ||
contains: [ | ||
hljs.BACKSLASH_ESCAPE | ||
] | ||
} | ||
@@ -248,3 +259,3 @@ ] | ||
/(?:mut\s+)?/, | ||
hljs.UNDERSCORE_IDENT_RE | ||
UNDERSCORE_IDENT_RE | ||
], | ||
@@ -262,3 +273,3 @@ className: { | ||
/\s+/, | ||
hljs.UNDERSCORE_IDENT_RE, | ||
UNDERSCORE_IDENT_RE, | ||
/\s+/, | ||
@@ -277,3 +288,3 @@ /in/ | ||
/\s+/, | ||
hljs.UNDERSCORE_IDENT_RE | ||
UNDERSCORE_IDENT_RE | ||
], | ||
@@ -289,3 +300,3 @@ className: { | ||
/\s+/, | ||
hljs.UNDERSCORE_IDENT_RE | ||
UNDERSCORE_IDENT_RE | ||
], | ||
@@ -292,0 +303,0 @@ className: { |
@@ -5,2 +5,3 @@ /* | ||
Description: Syntax Highlighting for SAS | ||
Category: scientific | ||
*/ | ||
@@ -7,0 +8,0 @@ |
@@ -46,3 +46,3 @@ const MODES = (hljs) => { | ||
const TAGS = [ | ||
const HTML_TAGS = [ | ||
'a', | ||
@@ -99,3 +99,6 @@ 'abbr', | ||
'ol', | ||
'optgroup', | ||
'option', | ||
'p', | ||
'picture', | ||
'q', | ||
@@ -105,2 +108,4 @@ 'quote', | ||
'section', | ||
'select', | ||
'source', | ||
'span', | ||
@@ -124,2 +129,54 @@ 'strong', | ||
const SVG_TAGS = [ | ||
'defs', | ||
'g', | ||
'marker', | ||
'mask', | ||
'pattern', | ||
'svg', | ||
'switch', | ||
'symbol', | ||
'feBlend', | ||
'feColorMatrix', | ||
'feComponentTransfer', | ||
'feComposite', | ||
'feConvolveMatrix', | ||
'feDiffuseLighting', | ||
'feDisplacementMap', | ||
'feFlood', | ||
'feGaussianBlur', | ||
'feImage', | ||
'feMerge', | ||
'feMorphology', | ||
'feOffset', | ||
'feSpecularLighting', | ||
'feTile', | ||
'feTurbulence', | ||
'linearGradient', | ||
'radialGradient', | ||
'stop', | ||
'circle', | ||
'ellipse', | ||
'image', | ||
'line', | ||
'path', | ||
'polygon', | ||
'polyline', | ||
'rect', | ||
'text', | ||
'use', | ||
'textPath', | ||
'tspan', | ||
'foreignObject', | ||
'clipPath' | ||
]; | ||
const TAGS = [ | ||
...HTML_TAGS, | ||
...SVG_TAGS, | ||
]; | ||
// Sorting, then reversing makes sure longer attributes/elements like | ||
// `font-weight` are matched fully instead of getting false positives on say `font` | ||
const MEDIA_FEATURES = [ | ||
@@ -160,3 +217,3 @@ 'any-hover', | ||
'max-height' | ||
]; | ||
].sort().reverse(); | ||
@@ -224,3 +281,3 @@ // https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes | ||
'where' // where() | ||
]; | ||
].sort().reverse(); | ||
@@ -243,8 +300,10 @@ // https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-elements | ||
'spelling-error' | ||
]; | ||
].sort().reverse(); | ||
const ATTRIBUTES = [ | ||
'accent-color', | ||
'align-content', | ||
'align-items', | ||
'align-self', | ||
'alignment-baseline', | ||
'all', | ||
@@ -260,2 +319,3 @@ 'animation', | ||
'animation-timing-function', | ||
'appearance', | ||
'backface-visibility', | ||
@@ -272,2 +332,3 @@ 'background', | ||
'background-size', | ||
'baseline-shift', | ||
'block-size', | ||
@@ -319,2 +380,4 @@ 'border', | ||
'border-right', | ||
'border-end-end-radius', | ||
'border-end-start-radius', | ||
'border-right-color', | ||
@@ -324,2 +387,4 @@ 'border-right-style', | ||
'border-spacing', | ||
'border-start-end-radius', | ||
'border-start-start-radius', | ||
'border-style', | ||
@@ -340,2 +405,4 @@ 'border-top', | ||
'break-inside', | ||
'cx', | ||
'cy', | ||
'caption-side', | ||
@@ -348,2 +415,7 @@ 'caret-color', | ||
'color', | ||
'color-interpolation', | ||
'color-interpolation-filters', | ||
'color-profile', | ||
'color-rendering', | ||
'color-scheme', | ||
'column-count', | ||
@@ -370,3 +442,8 @@ 'column-fill', | ||
'display', | ||
'dominant-baseline', | ||
'empty-cells', | ||
'enable-background', | ||
'fill', | ||
'fill-opacity', | ||
'fill-rule', | ||
'filter', | ||
@@ -382,2 +459,4 @@ 'flex', | ||
'flow', | ||
'flood-color', | ||
'flood-opacity', | ||
'font', | ||
@@ -404,2 +483,3 @@ 'font-display', | ||
'gap', | ||
'glyph-orientation-horizontal', | ||
'glyph-orientation-vertical', | ||
@@ -431,6 +511,17 @@ 'grid', | ||
'inline-size', | ||
'inset', | ||
'inset-block', | ||
'inset-block-end', | ||
'inset-block-start', | ||
'inset-inline', | ||
'inset-inline-end', | ||
'inset-inline-start', | ||
'isolation', | ||
'kerning', | ||
'justify-content', | ||
'justify-items', | ||
'justify-self', | ||
'left', | ||
'letter-spacing', | ||
'lighting-color', | ||
'line-break', | ||
@@ -442,2 +533,7 @@ 'line-height', | ||
'list-style-type', | ||
'marker', | ||
'marker-end', | ||
'marker-mid', | ||
'marker-start', | ||
'mask', | ||
'margin', | ||
@@ -524,2 +620,3 @@ 'margin-block', | ||
'quotes', | ||
'r', | ||
'resize', | ||
@@ -530,3 +627,5 @@ 'rest', | ||
'right', | ||
'rotate', | ||
'row-gap', | ||
'scale', | ||
'scroll-margin', | ||
@@ -563,2 +662,13 @@ 'scroll-margin-block', | ||
'shape-outside', | ||
'shape-rendering', | ||
'stop-color', | ||
'stop-opacity', | ||
'stroke', | ||
'stroke-dasharray', | ||
'stroke-dashoffset', | ||
'stroke-linecap', | ||
'stroke-linejoin', | ||
'stroke-miterlimit', | ||
'stroke-opacity', | ||
'stroke-width', | ||
'speak', | ||
@@ -569,2 +679,3 @@ 'speak-as', | ||
'table-layout', | ||
'text-anchor', | ||
'text-align', | ||
@@ -577,3 +688,5 @@ 'text-align-all', | ||
'text-decoration-line', | ||
'text-decoration-skip-ink', | ||
'text-decoration-style', | ||
'text-decoration-thickness', | ||
'text-emphasis', | ||
@@ -590,2 +703,3 @@ 'text-emphasis-color', | ||
'text-transform', | ||
'text-underline-offset', | ||
'text-underline-position', | ||
@@ -602,3 +716,5 @@ 'top', | ||
'transition-timing-function', | ||
'translate', | ||
'unicode-bidi', | ||
'vector-effect', | ||
'vertical-align', | ||
@@ -622,6 +738,6 @@ 'visibility', | ||
'writing-mode', | ||
'x', | ||
'y', | ||
'z-index' | ||
// reverse makes sure longer attributes `font-weight` are matched fully | ||
// instead of getting false positives on say `font` | ||
].reverse(); | ||
].sort().reverse(); | ||
@@ -628,0 +744,0 @@ /* |
@@ -6,2 +6,3 @@ /* | ||
Website: https://github.com/JesusFreke/smali | ||
Category: assembler | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -6,2 +6,3 @@ /* | ||
Website: https://en.wikipedia.org/wiki/Smalltalk | ||
Category: system | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -6,2 +6,3 @@ /* | ||
Website: https://en.wikipedia.org/wiki/ISO_10303-21 | ||
Category: syntax | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -46,3 +46,3 @@ const MODES = (hljs) => { | ||
const TAGS = [ | ||
const HTML_TAGS = [ | ||
'a', | ||
@@ -99,3 +99,6 @@ 'abbr', | ||
'ol', | ||
'optgroup', | ||
'option', | ||
'p', | ||
'picture', | ||
'q', | ||
@@ -105,2 +108,4 @@ 'quote', | ||
'section', | ||
'select', | ||
'source', | ||
'span', | ||
@@ -124,2 +129,54 @@ 'strong', | ||
const SVG_TAGS = [ | ||
'defs', | ||
'g', | ||
'marker', | ||
'mask', | ||
'pattern', | ||
'svg', | ||
'switch', | ||
'symbol', | ||
'feBlend', | ||
'feColorMatrix', | ||
'feComponentTransfer', | ||
'feComposite', | ||
'feConvolveMatrix', | ||
'feDiffuseLighting', | ||
'feDisplacementMap', | ||
'feFlood', | ||
'feGaussianBlur', | ||
'feImage', | ||
'feMerge', | ||
'feMorphology', | ||
'feOffset', | ||
'feSpecularLighting', | ||
'feTile', | ||
'feTurbulence', | ||
'linearGradient', | ||
'radialGradient', | ||
'stop', | ||
'circle', | ||
'ellipse', | ||
'image', | ||
'line', | ||
'path', | ||
'polygon', | ||
'polyline', | ||
'rect', | ||
'text', | ||
'use', | ||
'textPath', | ||
'tspan', | ||
'foreignObject', | ||
'clipPath' | ||
]; | ||
const TAGS = [ | ||
...HTML_TAGS, | ||
...SVG_TAGS, | ||
]; | ||
// Sorting, then reversing makes sure longer attributes/elements like | ||
// `font-weight` are matched fully instead of getting false positives on say `font` | ||
const MEDIA_FEATURES = [ | ||
@@ -160,3 +217,3 @@ 'any-hover', | ||
'max-height' | ||
]; | ||
].sort().reverse(); | ||
@@ -224,3 +281,3 @@ // https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes | ||
'where' // where() | ||
]; | ||
].sort().reverse(); | ||
@@ -243,8 +300,10 @@ // https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-elements | ||
'spelling-error' | ||
]; | ||
].sort().reverse(); | ||
const ATTRIBUTES = [ | ||
'accent-color', | ||
'align-content', | ||
'align-items', | ||
'align-self', | ||
'alignment-baseline', | ||
'all', | ||
@@ -260,2 +319,3 @@ 'animation', | ||
'animation-timing-function', | ||
'appearance', | ||
'backface-visibility', | ||
@@ -272,2 +332,3 @@ 'background', | ||
'background-size', | ||
'baseline-shift', | ||
'block-size', | ||
@@ -319,2 +380,4 @@ 'border', | ||
'border-right', | ||
'border-end-end-radius', | ||
'border-end-start-radius', | ||
'border-right-color', | ||
@@ -324,2 +387,4 @@ 'border-right-style', | ||
'border-spacing', | ||
'border-start-end-radius', | ||
'border-start-start-radius', | ||
'border-style', | ||
@@ -340,2 +405,4 @@ 'border-top', | ||
'break-inside', | ||
'cx', | ||
'cy', | ||
'caption-side', | ||
@@ -348,2 +415,7 @@ 'caret-color', | ||
'color', | ||
'color-interpolation', | ||
'color-interpolation-filters', | ||
'color-profile', | ||
'color-rendering', | ||
'color-scheme', | ||
'column-count', | ||
@@ -370,3 +442,8 @@ 'column-fill', | ||
'display', | ||
'dominant-baseline', | ||
'empty-cells', | ||
'enable-background', | ||
'fill', | ||
'fill-opacity', | ||
'fill-rule', | ||
'filter', | ||
@@ -382,2 +459,4 @@ 'flex', | ||
'flow', | ||
'flood-color', | ||
'flood-opacity', | ||
'font', | ||
@@ -404,2 +483,3 @@ 'font-display', | ||
'gap', | ||
'glyph-orientation-horizontal', | ||
'glyph-orientation-vertical', | ||
@@ -431,6 +511,17 @@ 'grid', | ||
'inline-size', | ||
'inset', | ||
'inset-block', | ||
'inset-block-end', | ||
'inset-block-start', | ||
'inset-inline', | ||
'inset-inline-end', | ||
'inset-inline-start', | ||
'isolation', | ||
'kerning', | ||
'justify-content', | ||
'justify-items', | ||
'justify-self', | ||
'left', | ||
'letter-spacing', | ||
'lighting-color', | ||
'line-break', | ||
@@ -442,2 +533,7 @@ 'line-height', | ||
'list-style-type', | ||
'marker', | ||
'marker-end', | ||
'marker-mid', | ||
'marker-start', | ||
'mask', | ||
'margin', | ||
@@ -524,2 +620,3 @@ 'margin-block', | ||
'quotes', | ||
'r', | ||
'resize', | ||
@@ -530,3 +627,5 @@ 'rest', | ||
'right', | ||
'rotate', | ||
'row-gap', | ||
'scale', | ||
'scroll-margin', | ||
@@ -563,2 +662,13 @@ 'scroll-margin-block', | ||
'shape-outside', | ||
'shape-rendering', | ||
'stop-color', | ||
'stop-opacity', | ||
'stroke', | ||
'stroke-dasharray', | ||
'stroke-dashoffset', | ||
'stroke-linecap', | ||
'stroke-linejoin', | ||
'stroke-miterlimit', | ||
'stroke-opacity', | ||
'stroke-width', | ||
'speak', | ||
@@ -569,2 +679,3 @@ 'speak-as', | ||
'table-layout', | ||
'text-anchor', | ||
'text-align', | ||
@@ -577,3 +688,5 @@ 'text-align-all', | ||
'text-decoration-line', | ||
'text-decoration-skip-ink', | ||
'text-decoration-style', | ||
'text-decoration-thickness', | ||
'text-emphasis', | ||
@@ -590,2 +703,3 @@ 'text-emphasis-color', | ||
'text-transform', | ||
'text-underline-offset', | ||
'text-underline-position', | ||
@@ -602,3 +716,5 @@ 'top', | ||
'transition-timing-function', | ||
'translate', | ||
'unicode-bidi', | ||
'vector-effect', | ||
'vertical-align', | ||
@@ -622,6 +738,6 @@ 'visibility', | ||
'writing-mode', | ||
'x', | ||
'y', | ||
'z-index' | ||
// reverse makes sure longer attributes `font-weight` are matched fully | ||
// instead of getting false positives on say `font` | ||
].reverse(); | ||
].sort().reverse(); | ||
@@ -628,0 +744,0 @@ /* |
@@ -5,2 +5,3 @@ /* | ||
Website: https://pypi.org/project/python-subunit/ | ||
Category: protocols | ||
*/ | ||
@@ -7,0 +8,0 @@ |
@@ -156,2 +156,3 @@ /** | ||
'override', // contextual | ||
'package', | ||
'postfix', // contextual | ||
@@ -653,6 +654,8 @@ 'precedencegroup', | ||
}; | ||
const KEYWORD_ATTRIBUTE = { | ||
scope: 'keyword', | ||
match: concat(/@/, either(...keywordAttributes)) | ||
match: concat(/@/, either(...keywordAttributes), lookahead(either(/\(/, /\s+/))), | ||
}; | ||
const USER_DEFINED_ATTRIBUTE = { | ||
@@ -662,2 +665,3 @@ scope: 'meta', | ||
}; | ||
const ATTRIBUTES = [ | ||
@@ -855,2 +859,33 @@ AVAILABLE_ATTRIBUTE, | ||
const TYPE_DECLARATION = { | ||
begin: [ | ||
/(struct|protocol|class|extension|enum|actor)/, | ||
/\s+/, | ||
identifier, | ||
/\s*/, | ||
], | ||
beginScope: { | ||
1: "keyword", | ||
3: "title.class" | ||
}, | ||
keywords: KEYWORDS, | ||
contains: [ | ||
GENERIC_PARAMETERS, | ||
...KEYWORD_MODES, | ||
{ | ||
begin: /:/, | ||
end: /\{/, | ||
keywords: KEYWORDS, | ||
contains: [ | ||
{ | ||
scope: "title.class.inherited", | ||
match: typeIdentifier, | ||
}, | ||
...KEYWORD_MODES, | ||
], | ||
relevance: 0, | ||
}, | ||
] | ||
}; | ||
// Add supported submodes to string interpolation. | ||
@@ -889,15 +924,3 @@ for (const variant of STRING.variants) { | ||
INIT_SUBSCRIPT, | ||
{ | ||
beginKeywords: 'struct protocol class extension enum actor', | ||
end: '\\{', | ||
excludeEnd: true, | ||
keywords: KEYWORDS, | ||
contains: [ | ||
hljs.inherit(hljs.TITLE_MODE, { | ||
className: "title.class", | ||
begin: /[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/ | ||
}), | ||
...KEYWORD_MODES | ||
] | ||
}, | ||
TYPE_DECLARATION, | ||
OPERATOR_DECLARATION, | ||
@@ -904,0 +927,0 @@ PRECEDENCEGROUP, |
@@ -6,2 +6,3 @@ /* | ||
Website: https://picard.musicbrainz.org | ||
Category: scripting | ||
*/ | ||
@@ -8,0 +9,0 @@ function taggerscript(hljs) { |
@@ -6,2 +6,3 @@ /* | ||
Website: https://www.tcl.tk/about/language.html | ||
Category: scripting | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -5,2 +5,3 @@ /* | ||
Description: FANUC TP programming language (TPP). | ||
Category: hardware | ||
*/ | ||
@@ -7,0 +8,0 @@ |
@@ -293,3 +293,3 @@ const IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*'; | ||
const HTML_TEMPLATE = { | ||
begin: 'html`', | ||
begin: '\.?html`', | ||
end: '', | ||
@@ -307,3 +307,3 @@ starts: { | ||
const CSS_TEMPLATE = { | ||
begin: 'css`', | ||
begin: '\.?css`', | ||
end: '', | ||
@@ -321,3 +321,3 @@ starts: { | ||
const GRAPHQL_TEMPLATE = { | ||
begin: 'gql`', | ||
begin: '\.?gql`', | ||
end: '', | ||
@@ -419,3 +419,3 @@ starts: { | ||
{ | ||
begin: /\(/, | ||
begin: /(\s*)\(/, | ||
end: /\)/, | ||
@@ -428,3 +428,4 @@ keywords: KEYWORDS$1, | ||
className: 'params', | ||
begin: /\(/, | ||
// convert this to negative lookbehind in v12 | ||
begin: /(\s*)\(/, // to match the parms with | ||
end: /\)/, | ||
@@ -552,4 +553,4 @@ excludeBegin: true, | ||
"import" | ||
]), | ||
IDENT_RE$1, regex.lookahead(/\(/)), | ||
].map(x => `${x}\\s*\\(`)), | ||
IDENT_RE$1, regex.lookahead(/\s*\(/)), | ||
className: "title.function", | ||
@@ -675,3 +676,3 @@ relevance: 0 | ||
{ | ||
begin: /\(/, | ||
begin: /(\s*)\(/, | ||
end: /\)/, | ||
@@ -801,6 +802,11 @@ excludeBegin: true, | ||
const NAMESPACE = { | ||
beginKeywords: 'namespace', | ||
end: /\{/, | ||
excludeEnd: true, | ||
contains: [ tsLanguage.exports.CLASS_REFERENCE ] | ||
begin: [ | ||
/namespace/, | ||
/\s+/, | ||
hljs.IDENT_RE | ||
], | ||
beginScope: { | ||
1: "keyword", | ||
3: "title.class" | ||
} | ||
}; | ||
@@ -824,3 +830,3 @@ const INTERFACE = { | ||
"type", | ||
"namespace", | ||
// "namespace", | ||
"interface", | ||
@@ -835,4 +841,12 @@ "public", | ||
"enum", | ||
"override" | ||
"override", | ||
"satisfies" | ||
]; | ||
/* | ||
namespace is a TS keyword but it's fine to use it as a variable name too. | ||
const message = 'foo'; | ||
const namespace = 'bar'; | ||
*/ | ||
const KEYWORDS$1 = { | ||
@@ -863,2 +877,9 @@ $pattern: IDENT_RE, | ||
tsLanguage.exports.PARAMS_CONTAINS.push(DECORATOR); | ||
// highlight the function params | ||
const ATTRIBUTE_HIGHLIGHT = tsLanguage.contains.find(c => c.className === "attr"); | ||
tsLanguage.exports.PARAMS_CONTAINS.push([ | ||
tsLanguage.exports.CLASS_REFERENCE, // class reference for highlighting the params types | ||
ATTRIBUTE_HIGHLIGHT, // highlight the params key | ||
]); | ||
tsLanguage.contains = tsLanguage.contains.concat([ | ||
@@ -865,0 +886,0 @@ DECORATOR, |
@@ -6,2 +6,3 @@ /* | ||
Website: https://wiki.gnome.org/Projects/Vala | ||
Category: system | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -7,2 +7,3 @@ /* | ||
Website: http://www.verilog.com | ||
Category: hardware | ||
*/ | ||
@@ -9,0 +10,0 @@ |
@@ -7,2 +7,3 @@ /* | ||
Website: https://en.wikipedia.org/wiki/VHDL | ||
Category: hardware | ||
*/ | ||
@@ -9,0 +10,0 @@ |
@@ -23,7 +23,8 @@ /* | ||
variants: [ | ||
{ begin: '\\w[\\w :\\/.-]*:(?=[ \t]|$)' }, | ||
{ // double quoted keys | ||
begin: '"\\w[\\w :\\/.-]*":(?=[ \t]|$)' }, | ||
{ // single quoted keys | ||
begin: '\'\\w[\\w :\\/.-]*\':(?=[ \t]|$)' } | ||
// added brackets support | ||
{ begin: /\w[\w :()\./-]*:(?=[ \t]|$)/ }, | ||
{ // double quoted keys - with brackets | ||
begin: /"\w[\w :()\./-]*":(?=[ \t]|$)/ }, | ||
{ // single quoted keys - with brackets | ||
begin: /'\w[\w :()\./-]*':(?=[ \t]|$)/ }, | ||
] | ||
@@ -30,0 +31,0 @@ }; |
@@ -6,2 +6,3 @@ /* | ||
Website: https://zephir-lang.com/en | ||
Category: web | ||
Audit: 2020 | ||
@@ -8,0 +9,0 @@ */ |
@@ -5,2 +5,3 @@ /* | ||
Website: https://tools.ietf.org/html/rfc5234 | ||
Category: syntax | ||
Audit: 2020 | ||
@@ -7,0 +8,0 @@ */ |
@@ -11,16 +11,26 @@ /* | ||
function arcade(hljs) { | ||
const regex = hljs.regex; | ||
const IDENT_RE = '[A-Za-z_][0-9A-Za-z_]*'; | ||
const KEYWORDS = { | ||
keyword: [ | ||
"break", | ||
"case", | ||
"catch", | ||
"continue", | ||
"debugger", | ||
"do", | ||
"else", | ||
"export", | ||
"for", | ||
"function", | ||
"if", | ||
"for", | ||
"while", | ||
"var", | ||
"import", | ||
"in", | ||
"new", | ||
"function", | ||
"do", | ||
"return", | ||
"switch", | ||
"try", | ||
"var", | ||
"void", | ||
"else", | ||
"break" | ||
"while" | ||
], | ||
@@ -30,3 +40,2 @@ literal: [ | ||
"DoubleQuote", | ||
"false", | ||
"ForwardSlash", | ||
@@ -36,3 +45,2 @@ "Infinity", | ||
"NewLine", | ||
"null", | ||
"PI", | ||
@@ -42,2 +50,4 @@ "SingleQuote", | ||
"TextFormatting", | ||
"false", | ||
"null", | ||
"true", | ||
@@ -67,2 +77,3 @@ "undefined" | ||
"Centroid", | ||
"ChangeTimeZone", | ||
"Clip", | ||
@@ -74,2 +85,3 @@ "Concatenate", | ||
"ConvertDirection", | ||
"ConvexHull", | ||
"Cos", | ||
@@ -79,5 +91,6 @@ "Count", | ||
"Cut", | ||
"Date", | ||
"Date|0", | ||
"DateAdd", | ||
"DateDiff", | ||
"DateOnly", | ||
"Day", | ||
@@ -109,6 +122,7 @@ "Decode", | ||
"FeatureSetByPortalItem", | ||
"FeatureSetByRelationshipClass", | ||
"FeatureSetByRelationshipName", | ||
"Filter", | ||
"Find", | ||
"First", | ||
"First|0", | ||
"Floor", | ||
@@ -118,13 +132,21 @@ "FromCharCode", | ||
"FromJSON", | ||
"Front", | ||
"GdbVersion", | ||
"Generalize", | ||
"Geometry", | ||
"GetEnvironment", | ||
"GetFeatureSet", | ||
"GetFeatureSetInfo", | ||
"GetUser", | ||
"GroupBy", | ||
"Guid", | ||
"HasKey", | ||
"HasValue", | ||
"Hash", | ||
"HasKey", | ||
"Hour", | ||
"IIf", | ||
"ISOMonth", | ||
"ISOWeek", | ||
"ISOWeekday", | ||
"ISOYear", | ||
"Includes", | ||
@@ -137,6 +159,2 @@ "IndexOf", | ||
"IsNan", | ||
"ISOMonth", | ||
"ISOWeek", | ||
"ISOWeekday", | ||
"ISOYear", | ||
"IsSelfIntersecting", | ||
@@ -160,2 +178,4 @@ "IsSimple", | ||
"Multipoint", | ||
"NearestCoordinate", | ||
"NearestVertex", | ||
"NextSequenceValue", | ||
@@ -165,3 +185,3 @@ "None", | ||
"Number", | ||
"Offset|0", | ||
"Offset", | ||
"OrderBy", | ||
@@ -197,2 +217,3 @@ "Overlaps", | ||
"Sqrt", | ||
"StandardizeGuid", | ||
"Stdev", | ||
@@ -206,11 +227,14 @@ "SubtypeCode", | ||
"Text", | ||
"Time", | ||
"TimeZone", | ||
"TimeZoneOffset", | ||
"Timestamp", | ||
"ToCharCode", | ||
"ToCodePoint", | ||
"Today", | ||
"ToHex", | ||
"ToLocal", | ||
"ToUTC", | ||
"Today", | ||
"Top|0", | ||
"Touches", | ||
"ToUTC", | ||
"TrackAccelerationAt", | ||
@@ -240,10 +264,42 @@ "TrackAccelerationWindow", | ||
"Weekday", | ||
"When", | ||
"When|0", | ||
"Within", | ||
"Year" | ||
"Year|0", | ||
] | ||
}; | ||
const PROFILE_VARS = [ | ||
"aggregatedFeatures", | ||
"analytic", | ||
"config", | ||
"datapoint", | ||
"datastore", | ||
"editcontext", | ||
"feature", | ||
"featureSet", | ||
"feedfeature", | ||
"fencefeature", | ||
"fencenotificationtype", | ||
"join", | ||
"layer", | ||
"locationupdate", | ||
"map", | ||
"measure", | ||
"measure", | ||
"originalFeature", | ||
"record", | ||
"reference", | ||
"rowindex", | ||
"sourcedatastore", | ||
"sourcefeature", | ||
"sourcelayer", | ||
"target", | ||
"targetdatastore", | ||
"targetfeature", | ||
"targetlayer", | ||
"value", | ||
"view" | ||
]; | ||
const SYMBOL = { | ||
className: 'symbol', | ||
begin: '\\$[datastore|feature|layer|map|measure|sourcefeature|sourcelayer|targetfeature|targetlayer|value|view]+' | ||
begin: '\\$' + regex.either(...PROFILE_VARS) | ||
}; | ||
@@ -250,0 +306,0 @@ const NUMBER = { |
@@ -55,5 +55,40 @@ /* | ||
variants: [ | ||
{ begin: '\\b(0b[01\']+)' }, | ||
{ begin: '(-?)\\b([\\d\']+(\\.[\\d\']*)?|\\.[\\d\']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)' }, | ||
{ begin: '(-?)(\\b0[xX][a-fA-F0-9\']+|(\\b[\\d\']+(\\.[\\d\']*)?|\\.[\\d\']+)([eE][-+]?[\\d\']+)?)' } | ||
// Floating-point literal. | ||
{ begin: | ||
"[+-]?(?:" // Leading sign. | ||
// Decimal. | ||
+ "(?:" | ||
+"[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?" | ||
+ "|\\.[0-9](?:'?[0-9])*" | ||
+ ")(?:[Ee][+-]?[0-9](?:'?[0-9])*)?" | ||
+ "|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*" | ||
// Hexadecimal. | ||
+ "|0[Xx](?:" | ||
+"[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?" | ||
+ "|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*" | ||
+ ")[Pp][+-]?[0-9](?:'?[0-9])*" | ||
+ ")(?:" // Literal suffixes. | ||
+ "[Ff](?:16|32|64|128)?" | ||
+ "|(BF|bf)16" | ||
+ "|[Ll]" | ||
+ "|" // Literal suffix is optional. | ||
+ ")" | ||
}, | ||
// Integer literal. | ||
{ begin: | ||
"[+-]?\\b(?:" // Leading sign. | ||
+ "0[Bb][01](?:'?[01])*" // Binary. | ||
+ "|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*" // Hexadecimal. | ||
+ "|0(?:'?[0-7])*" // Octal or just a lone zero. | ||
+ "|[1-9](?:'?[0-9])*" // Decimal. | ||
+ ")(?:" // Literal suffixes. | ||
+ "[Uu](?:LL?|ll?)" | ||
+ "|[Uu][Zz]?" | ||
+ "|(?:LL?|ll?)[Uu]?" | ||
+ "|[Zz][Uu]" | ||
+ "|" // Literal suffix is optional. | ||
+ ")" | ||
// Note: there are user-defined literal suffixes too, but perhaps having the custom suffix not part of the | ||
// literal highlight actually makes it stand out more. | ||
} | ||
], | ||
@@ -574,2 +609,3 @@ relevance: 0 | ||
Website: https://www.arduino.cc | ||
Category: system | ||
*/ | ||
@@ -576,0 +612,0 @@ |
@@ -6,2 +6,3 @@ /* | ||
Description: Syntax Highlighting for the AspectJ Language which is a general-purpose aspect-oriented extension to the Java programming language. | ||
Category: system | ||
Audit: 2020 | ||
@@ -8,0 +9,0 @@ */ |
@@ -6,2 +6,3 @@ /* | ||
Description: language definition for Awk scripts | ||
Category: scripting | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -6,3 +6,3 @@ /* | ||
Website: https://www.gnu.org/software/bash/ | ||
Category: common | ||
Category: common, scripting | ||
*/ | ||
@@ -42,2 +42,14 @@ | ||
}; | ||
const COMMENT = hljs.inherit( | ||
hljs.COMMENT(), | ||
{ | ||
match: [ | ||
/(^|\s)/, | ||
/#.*$/ | ||
], | ||
scope: { | ||
2: 'comment' | ||
} | ||
} | ||
); | ||
const HERE_DOC = { | ||
@@ -176,2 +188,3 @@ begin: /<<-?\s*(?=\w+)/, | ||
"source", | ||
"sudo", | ||
"type", | ||
@@ -362,3 +375,6 @@ "typeset", | ||
name: 'Bash', | ||
aliases: [ 'sh' ], | ||
aliases: [ | ||
'sh', | ||
'zsh' | ||
], | ||
keywords: { | ||
@@ -383,3 +399,3 @@ $pattern: /\b[a-z][a-z0-9._-]+\b/, | ||
ARITHMETIC, | ||
hljs.HASH_COMMENT_MODE, | ||
COMMENT, | ||
HERE_DOC, | ||
@@ -386,0 +402,0 @@ PATH_MODE, |
@@ -6,2 +6,3 @@ /* | ||
Website: https://en.wikipedia.org/wiki/Tandy_1000 | ||
Category: system | ||
*/ | ||
@@ -8,0 +9,0 @@ |
/* | ||
Language: Backus–Naur Form | ||
Website: https://en.wikipedia.org/wiki/Backus–Naur_form | ||
Category: syntax | ||
Author: Oleg Efimov <efimovov@gmail.com> | ||
@@ -5,0 +6,0 @@ */ |
@@ -73,3 +73,3 @@ /* | ||
'if else elif endif define undef warning error line ' | ||
+ 'pragma _Pragma ifdef ifndef include' }, | ||
+ 'pragma _Pragma ifdef ifndef elifdef elifndef include' }, | ||
contains: [ | ||
@@ -118,2 +118,4 @@ { | ||
"sizeof", | ||
"typeof", | ||
"typeof_unqual", | ||
"struct", | ||
@@ -153,2 +155,3 @@ "switch", | ||
"_Bool", | ||
"_BitInt", | ||
"_Complex", | ||
@@ -158,6 +161,17 @@ "_Imaginary", | ||
"_Decimal64", | ||
"_Decimal96", | ||
"_Decimal128", | ||
"_Decimal64x", | ||
"_Decimal128x", | ||
"_Float16", | ||
"_Float32", | ||
"_Float64", | ||
"_Float128", | ||
"_Float32x", | ||
"_Float64x", | ||
"_Float128x", | ||
// modifiers | ||
"const", | ||
"static", | ||
"constexpr", | ||
// aliases | ||
@@ -164,0 +178,0 @@ "complex", |
@@ -6,2 +6,3 @@ /* | ||
Website: https://docs.microsoft.com/en-us/dynamics-nav/programming-in-c-al | ||
Category: enterprise | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -5,2 +5,3 @@ /* | ||
Website: https://ceylon-lang.org | ||
Category: system | ||
*/ | ||
@@ -7,0 +8,0 @@ |
@@ -6,2 +6,3 @@ /* | ||
Website: https://cmake.org | ||
Category: build-system | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -55,5 +55,40 @@ /* | ||
variants: [ | ||
{ begin: '\\b(0b[01\']+)' }, | ||
{ begin: '(-?)\\b([\\d\']+(\\.[\\d\']*)?|\\.[\\d\']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)' }, | ||
{ begin: '(-?)(\\b0[xX][a-fA-F0-9\']+|(\\b[\\d\']+(\\.[\\d\']*)?|\\.[\\d\']+)([eE][-+]?[\\d\']+)?)' } | ||
// Floating-point literal. | ||
{ begin: | ||
"[+-]?(?:" // Leading sign. | ||
// Decimal. | ||
+ "(?:" | ||
+"[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?" | ||
+ "|\\.[0-9](?:'?[0-9])*" | ||
+ ")(?:[Ee][+-]?[0-9](?:'?[0-9])*)?" | ||
+ "|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*" | ||
// Hexadecimal. | ||
+ "|0[Xx](?:" | ||
+"[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?" | ||
+ "|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*" | ||
+ ")[Pp][+-]?[0-9](?:'?[0-9])*" | ||
+ ")(?:" // Literal suffixes. | ||
+ "[Ff](?:16|32|64|128)?" | ||
+ "|(BF|bf)16" | ||
+ "|[Ll]" | ||
+ "|" // Literal suffix is optional. | ||
+ ")" | ||
}, | ||
// Integer literal. | ||
{ begin: | ||
"[+-]?\\b(?:" // Leading sign. | ||
+ "0[Bb][01](?:'?[01])*" // Binary. | ||
+ "|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*" // Hexadecimal. | ||
+ "|0(?:'?[0-7])*" // Octal or just a lone zero. | ||
+ "|[1-9](?:'?[0-9])*" // Decimal. | ||
+ ")(?:" // Literal suffixes. | ||
+ "[Uu](?:LL?|ll?)" | ||
+ "|[Uu][Zz]?" | ||
+ "|(?:LL?|ll?)[Uu]?" | ||
+ "|[Zz][Uu]" | ||
+ "|" // Literal suffix is optional. | ||
+ ")" | ||
// Note: there are user-defined literal suffixes too, but perhaps having the custom suffix not part of the | ||
// literal highlight actually makes it stand out more. | ||
} | ||
], | ||
@@ -60,0 +95,0 @@ relevance: 0 |
@@ -5,2 +5,3 @@ /* | ||
Website: https://crystal-lang.org | ||
Category: system | ||
*/ | ||
@@ -7,0 +8,0 @@ |
@@ -167,2 +167,7 @@ /* | ||
}; | ||
const RAW_STRING = { | ||
className: 'string', | ||
begin: /"""("*)(?!")(.|\n)*?"""\1/, | ||
relevance: 1 | ||
}; | ||
const VERBATIM_STRING = { | ||
@@ -233,2 +238,3 @@ className: 'string', | ||
const STRING = { variants: [ | ||
RAW_STRING, | ||
INTERPOLATED_VERBATIM_STRING, | ||
@@ -235,0 +241,0 @@ INTERPOLATED_STRING, |
@@ -6,2 +6,3 @@ /* | ||
Website: https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP | ||
Category: web | ||
@@ -8,0 +9,0 @@ vim: ts=2 sw=2 st=2 |
@@ -46,3 +46,3 @@ const MODES = (hljs) => { | ||
const TAGS = [ | ||
const HTML_TAGS = [ | ||
'a', | ||
@@ -99,3 +99,6 @@ 'abbr', | ||
'ol', | ||
'optgroup', | ||
'option', | ||
'p', | ||
'picture', | ||
'q', | ||
@@ -105,2 +108,4 @@ 'quote', | ||
'section', | ||
'select', | ||
'source', | ||
'span', | ||
@@ -124,2 +129,54 @@ 'strong', | ||
const SVG_TAGS = [ | ||
'defs', | ||
'g', | ||
'marker', | ||
'mask', | ||
'pattern', | ||
'svg', | ||
'switch', | ||
'symbol', | ||
'feBlend', | ||
'feColorMatrix', | ||
'feComponentTransfer', | ||
'feComposite', | ||
'feConvolveMatrix', | ||
'feDiffuseLighting', | ||
'feDisplacementMap', | ||
'feFlood', | ||
'feGaussianBlur', | ||
'feImage', | ||
'feMerge', | ||
'feMorphology', | ||
'feOffset', | ||
'feSpecularLighting', | ||
'feTile', | ||
'feTurbulence', | ||
'linearGradient', | ||
'radialGradient', | ||
'stop', | ||
'circle', | ||
'ellipse', | ||
'image', | ||
'line', | ||
'path', | ||
'polygon', | ||
'polyline', | ||
'rect', | ||
'text', | ||
'use', | ||
'textPath', | ||
'tspan', | ||
'foreignObject', | ||
'clipPath' | ||
]; | ||
const TAGS = [ | ||
...HTML_TAGS, | ||
...SVG_TAGS, | ||
]; | ||
// Sorting, then reversing makes sure longer attributes/elements like | ||
// `font-weight` are matched fully instead of getting false positives on say `font` | ||
const MEDIA_FEATURES = [ | ||
@@ -160,3 +217,3 @@ 'any-hover', | ||
'max-height' | ||
]; | ||
].sort().reverse(); | ||
@@ -224,3 +281,3 @@ // https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes | ||
'where' // where() | ||
]; | ||
].sort().reverse(); | ||
@@ -243,8 +300,10 @@ // https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-elements | ||
'spelling-error' | ||
]; | ||
].sort().reverse(); | ||
const ATTRIBUTES = [ | ||
'accent-color', | ||
'align-content', | ||
'align-items', | ||
'align-self', | ||
'alignment-baseline', | ||
'all', | ||
@@ -260,2 +319,3 @@ 'animation', | ||
'animation-timing-function', | ||
'appearance', | ||
'backface-visibility', | ||
@@ -272,2 +332,3 @@ 'background', | ||
'background-size', | ||
'baseline-shift', | ||
'block-size', | ||
@@ -319,2 +380,4 @@ 'border', | ||
'border-right', | ||
'border-end-end-radius', | ||
'border-end-start-radius', | ||
'border-right-color', | ||
@@ -324,2 +387,4 @@ 'border-right-style', | ||
'border-spacing', | ||
'border-start-end-radius', | ||
'border-start-start-radius', | ||
'border-style', | ||
@@ -340,2 +405,4 @@ 'border-top', | ||
'break-inside', | ||
'cx', | ||
'cy', | ||
'caption-side', | ||
@@ -348,2 +415,7 @@ 'caret-color', | ||
'color', | ||
'color-interpolation', | ||
'color-interpolation-filters', | ||
'color-profile', | ||
'color-rendering', | ||
'color-scheme', | ||
'column-count', | ||
@@ -370,3 +442,8 @@ 'column-fill', | ||
'display', | ||
'dominant-baseline', | ||
'empty-cells', | ||
'enable-background', | ||
'fill', | ||
'fill-opacity', | ||
'fill-rule', | ||
'filter', | ||
@@ -382,2 +459,4 @@ 'flex', | ||
'flow', | ||
'flood-color', | ||
'flood-opacity', | ||
'font', | ||
@@ -404,2 +483,3 @@ 'font-display', | ||
'gap', | ||
'glyph-orientation-horizontal', | ||
'glyph-orientation-vertical', | ||
@@ -431,6 +511,17 @@ 'grid', | ||
'inline-size', | ||
'inset', | ||
'inset-block', | ||
'inset-block-end', | ||
'inset-block-start', | ||
'inset-inline', | ||
'inset-inline-end', | ||
'inset-inline-start', | ||
'isolation', | ||
'kerning', | ||
'justify-content', | ||
'justify-items', | ||
'justify-self', | ||
'left', | ||
'letter-spacing', | ||
'lighting-color', | ||
'line-break', | ||
@@ -442,2 +533,7 @@ 'line-height', | ||
'list-style-type', | ||
'marker', | ||
'marker-end', | ||
'marker-mid', | ||
'marker-start', | ||
'mask', | ||
'margin', | ||
@@ -524,2 +620,3 @@ 'margin-block', | ||
'quotes', | ||
'r', | ||
'resize', | ||
@@ -530,3 +627,5 @@ 'rest', | ||
'right', | ||
'rotate', | ||
'row-gap', | ||
'scale', | ||
'scroll-margin', | ||
@@ -563,2 +662,13 @@ 'scroll-margin-block', | ||
'shape-outside', | ||
'shape-rendering', | ||
'stop-color', | ||
'stop-opacity', | ||
'stroke', | ||
'stroke-dasharray', | ||
'stroke-dashoffset', | ||
'stroke-linecap', | ||
'stroke-linejoin', | ||
'stroke-miterlimit', | ||
'stroke-opacity', | ||
'stroke-width', | ||
'speak', | ||
@@ -569,2 +679,3 @@ 'speak-as', | ||
'table-layout', | ||
'text-anchor', | ||
'text-align', | ||
@@ -577,3 +688,5 @@ 'text-align-all', | ||
'text-decoration-line', | ||
'text-decoration-skip-ink', | ||
'text-decoration-style', | ||
'text-decoration-thickness', | ||
'text-emphasis', | ||
@@ -590,2 +703,3 @@ 'text-emphasis-color', | ||
'text-transform', | ||
'text-underline-offset', | ||
'text-underline-position', | ||
@@ -602,3 +716,5 @@ 'top', | ||
'transition-timing-function', | ||
'translate', | ||
'unicode-bidi', | ||
'vector-effect', | ||
'vertical-align', | ||
@@ -622,6 +738,6 @@ 'visibility', | ||
'writing-mode', | ||
'x', | ||
'y', | ||
'z-index' | ||
// reverse makes sure longer attributes `font-weight` are matched fully | ||
// instead of getting false positives on say `font` | ||
].reverse(); | ||
].sort().reverse(); | ||
@@ -628,0 +744,0 @@ /* |
@@ -7,2 +7,3 @@ /* | ||
Website: https://dlang.org | ||
Category: system | ||
Date: 2012-04-08 | ||
@@ -9,0 +10,0 @@ */ |
/* | ||
Language: Delphi | ||
Website: https://www.embarcadero.com/products/delphi | ||
Category: system | ||
*/ | ||
@@ -167,10 +168,21 @@ | ||
{ | ||
// Regular numbers, e.g., 123, 123.456. | ||
match: /\b\d[\d_]*(\.\d[\d_]*)?/ }, | ||
{ | ||
// Hexadecimal notation, e.g., $7F. | ||
begin: '\\$[0-9A-Fa-f]+' }, | ||
match: /\$[\dA-Fa-f_]+/ }, | ||
{ | ||
// Hexadecimal literal with no digits | ||
match: /\$/, | ||
relevance: 0 }, | ||
{ | ||
// Octal notation, e.g., &42. | ||
begin: '&[0-7]+' }, | ||
match: /&[0-7][0-7_]*/ }, | ||
{ | ||
// Binary notation, e.g., %1010. | ||
begin: '%[01]+' } | ||
match: /%[01_]+/ }, | ||
{ | ||
// Binary literal with no digits | ||
match: /%/, | ||
relevance: 0 } | ||
] | ||
@@ -180,3 +192,8 @@ }; | ||
className: 'string', | ||
begin: /(#\d+)+/ | ||
variants: [ | ||
{ match: /#\d[\d_]*/ }, | ||
{ match: /#\$[\dA-Fa-f][\dA-Fa-f_]*/ }, | ||
{ match: /#&[0-7][0-7_]*/ }, | ||
{ match: /#%[01][01_]*/ } | ||
] | ||
}; | ||
@@ -223,3 +240,2 @@ const CLASS = { | ||
CHAR_STRING, | ||
hljs.NUMBER_MODE, | ||
NUMBER, | ||
@@ -226,0 +242,0 @@ CLASS, |
@@ -6,2 +6,3 @@ /* | ||
Website: https://en.wikipedia.org/wiki/Batch_file | ||
Category: scripting | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -5,2 +5,3 @@ /* | ||
Website: https://en.wikipedia.org/wiki/Extended_Backus–Naur_form | ||
Category: syntax | ||
*/ | ||
@@ -7,0 +8,0 @@ |
@@ -79,2 +79,6 @@ /* | ||
}; | ||
const CHAR_LITERAL = { | ||
scope: 'string', | ||
match: /\$(\\([^0-9]|[0-9]{1,3}|)|.)/, | ||
}; | ||
@@ -97,3 +101,4 @@ const BLOCK_STATEMENTS = { | ||
VAR2, | ||
RECORD_ACCESS | ||
RECORD_ACCESS, | ||
CHAR_LITERAL | ||
]; | ||
@@ -111,3 +116,4 @@ | ||
VAR2, | ||
RECORD_ACCESS | ||
RECORD_ACCESS, | ||
CHAR_LITERAL | ||
]; | ||
@@ -148,2 +154,3 @@ FUNCTION_CALL.contains[1].contains = BASIC_MODES; | ||
}; | ||
return { | ||
@@ -190,2 +197,3 @@ name: 'Erlang', | ||
TUPLE, | ||
CHAR_LITERAL, | ||
{ begin: /\.$/ } // relevance booster | ||
@@ -192,0 +200,0 @@ ] |
@@ -6,2 +6,3 @@ /* | ||
Website: https://products.office.com/en-us/excel/ | ||
Category: enterprise | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -553,2 +553,3 @@ /* | ||
keywords: { | ||
$pattern: /\b[a-z][a-z0-9_]+\b|\.[a-z][a-z0-9_]+\./, | ||
keyword: KEYWORDS, | ||
@@ -555,0 +556,0 @@ literal: LITERALS, |
@@ -197,3 +197,3 @@ /* | ||
}, | ||
inherits || {} | ||
{} | ||
); | ||
@@ -200,0 +200,0 @@ mode.contains.push(FUNCTION_DEF); |
@@ -6,2 +6,3 @@ /* | ||
Website: https://www.sis.se/api/document/preview/911952/ | ||
Category: hardware | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -112,6 +112,21 @@ /* | ||
{ | ||
begin: hljs.C_NUMBER_RE + '[i]', | ||
relevance: 1 | ||
match: /-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/, // hex without a present digit before . (making a digit afterwards required) | ||
relevance: 0 | ||
}, | ||
hljs.C_NUMBER_MODE | ||
{ | ||
match: /-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/, // hex with a present digit before . (making a digit afterwards optional) | ||
relevance: 0 | ||
}, | ||
{ | ||
match: /-?\b0[oO](_?[0-7])*i?/, // leading 0o octal | ||
relevance: 0 | ||
}, | ||
{ | ||
match: /-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/, // decimal without a present digit before . (making a digit afterwards required) | ||
relevance: 0 | ||
}, | ||
{ | ||
match: /-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/, // decimal with a present digit before . (making a digit afterwards optional) | ||
relevance: 0 | ||
} | ||
] | ||
@@ -118,0 +133,0 @@ }, |
@@ -6,2 +6,3 @@ /* | ||
Website: http://golo-lang.org/ | ||
Category: system | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -6,2 +6,3 @@ /* | ||
Author: Damian Mee <mee.damian@gmail.com> | ||
Category: build-system | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -6,2 +6,3 @@ /* | ||
Website: https://groovy-lang.org | ||
Category: system | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -7,2 +7,3 @@ /* | ||
Website: https://haxe.org | ||
Category: system | ||
*/ | ||
@@ -91,3 +92,3 @@ | ||
className: 'type', // instantiation | ||
begin: /new */, | ||
beginKeywords: 'new', | ||
end: /\W/, | ||
@@ -94,0 +95,0 @@ excludeBegin: true, |
@@ -6,2 +6,3 @@ /* | ||
Website: http://inform7.com | ||
Category: gaming | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -111,3 +111,4 @@ // https://docs.oracle.com/javase/specs/jls/se15/html/jls-3.html#jls-3.10 | ||
'yield', | ||
'permits' | ||
'permits', | ||
'goto' | ||
]; | ||
@@ -114,0 +115,0 @@ |
@@ -293,3 +293,3 @@ const IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*'; | ||
const HTML_TEMPLATE = { | ||
begin: 'html`', | ||
begin: '\.?html`', | ||
end: '', | ||
@@ -307,3 +307,3 @@ starts: { | ||
const CSS_TEMPLATE = { | ||
begin: 'css`', | ||
begin: '\.?css`', | ||
end: '', | ||
@@ -321,3 +321,3 @@ starts: { | ||
const GRAPHQL_TEMPLATE = { | ||
begin: 'gql`', | ||
begin: '\.?gql`', | ||
end: '', | ||
@@ -419,3 +419,3 @@ starts: { | ||
{ | ||
begin: /\(/, | ||
begin: /(\s*)\(/, | ||
end: /\)/, | ||
@@ -428,3 +428,4 @@ keywords: KEYWORDS$1, | ||
className: 'params', | ||
begin: /\(/, | ||
// convert this to negative lookbehind in v12 | ||
begin: /(\s*)\(/, // to match the parms with | ||
end: /\)/, | ||
@@ -552,4 +553,4 @@ excludeBegin: true, | ||
"import" | ||
]), | ||
IDENT_RE$1, regex.lookahead(/\(/)), | ||
].map(x => `${x}\\s*\\(`)), | ||
IDENT_RE$1, regex.lookahead(/\s*\(/)), | ||
className: "title.function", | ||
@@ -675,3 +676,3 @@ relevance: 0 | ||
{ | ||
begin: /\(/, | ||
begin: /(\s*)\(/, | ||
end: /\)/, | ||
@@ -678,0 +679,0 @@ excludeBegin: true, |
@@ -37,2 +37,3 @@ /* | ||
name: 'JSON', | ||
aliases: ['jsonc'], | ||
keywords:{ | ||
@@ -39,0 +40,0 @@ literal: LITERALS, |
@@ -7,2 +7,3 @@ /* | ||
Requires: julia.js | ||
Category: scientific | ||
@@ -9,0 +10,0 @@ The Julia REPL code blocks look something like the following: |
@@ -7,2 +7,3 @@ /* | ||
Website: https://julialang.org | ||
Category: scientific | ||
*/ | ||
@@ -9,0 +10,0 @@ |
@@ -6,2 +6,3 @@ /* | ||
Website: http://www.lassosoft.com/What-Is-Lasso | ||
Category: database, web | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -46,3 +46,3 @@ const MODES = (hljs) => { | ||
const TAGS = [ | ||
const HTML_TAGS = [ | ||
'a', | ||
@@ -99,3 +99,6 @@ 'abbr', | ||
'ol', | ||
'optgroup', | ||
'option', | ||
'p', | ||
'picture', | ||
'q', | ||
@@ -105,2 +108,4 @@ 'quote', | ||
'section', | ||
'select', | ||
'source', | ||
'span', | ||
@@ -124,2 +129,54 @@ 'strong', | ||
const SVG_TAGS = [ | ||
'defs', | ||
'g', | ||
'marker', | ||
'mask', | ||
'pattern', | ||
'svg', | ||
'switch', | ||
'symbol', | ||
'feBlend', | ||
'feColorMatrix', | ||
'feComponentTransfer', | ||
'feComposite', | ||
'feConvolveMatrix', | ||
'feDiffuseLighting', | ||
'feDisplacementMap', | ||
'feFlood', | ||
'feGaussianBlur', | ||
'feImage', | ||
'feMerge', | ||
'feMorphology', | ||
'feOffset', | ||
'feSpecularLighting', | ||
'feTile', | ||
'feTurbulence', | ||
'linearGradient', | ||
'radialGradient', | ||
'stop', | ||
'circle', | ||
'ellipse', | ||
'image', | ||
'line', | ||
'path', | ||
'polygon', | ||
'polyline', | ||
'rect', | ||
'text', | ||
'use', | ||
'textPath', | ||
'tspan', | ||
'foreignObject', | ||
'clipPath' | ||
]; | ||
const TAGS = [ | ||
...HTML_TAGS, | ||
...SVG_TAGS, | ||
]; | ||
// Sorting, then reversing makes sure longer attributes/elements like | ||
// `font-weight` are matched fully instead of getting false positives on say `font` | ||
const MEDIA_FEATURES = [ | ||
@@ -160,3 +217,3 @@ 'any-hover', | ||
'max-height' | ||
]; | ||
].sort().reverse(); | ||
@@ -224,3 +281,3 @@ // https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes | ||
'where' // where() | ||
]; | ||
].sort().reverse(); | ||
@@ -243,8 +300,10 @@ // https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-elements | ||
'spelling-error' | ||
]; | ||
].sort().reverse(); | ||
const ATTRIBUTES = [ | ||
'accent-color', | ||
'align-content', | ||
'align-items', | ||
'align-self', | ||
'alignment-baseline', | ||
'all', | ||
@@ -260,2 +319,3 @@ 'animation', | ||
'animation-timing-function', | ||
'appearance', | ||
'backface-visibility', | ||
@@ -272,2 +332,3 @@ 'background', | ||
'background-size', | ||
'baseline-shift', | ||
'block-size', | ||
@@ -319,2 +380,4 @@ 'border', | ||
'border-right', | ||
'border-end-end-radius', | ||
'border-end-start-radius', | ||
'border-right-color', | ||
@@ -324,2 +387,4 @@ 'border-right-style', | ||
'border-spacing', | ||
'border-start-end-radius', | ||
'border-start-start-radius', | ||
'border-style', | ||
@@ -340,2 +405,4 @@ 'border-top', | ||
'break-inside', | ||
'cx', | ||
'cy', | ||
'caption-side', | ||
@@ -348,2 +415,7 @@ 'caret-color', | ||
'color', | ||
'color-interpolation', | ||
'color-interpolation-filters', | ||
'color-profile', | ||
'color-rendering', | ||
'color-scheme', | ||
'column-count', | ||
@@ -370,3 +442,8 @@ 'column-fill', | ||
'display', | ||
'dominant-baseline', | ||
'empty-cells', | ||
'enable-background', | ||
'fill', | ||
'fill-opacity', | ||
'fill-rule', | ||
'filter', | ||
@@ -382,2 +459,4 @@ 'flex', | ||
'flow', | ||
'flood-color', | ||
'flood-opacity', | ||
'font', | ||
@@ -404,2 +483,3 @@ 'font-display', | ||
'gap', | ||
'glyph-orientation-horizontal', | ||
'glyph-orientation-vertical', | ||
@@ -431,6 +511,17 @@ 'grid', | ||
'inline-size', | ||
'inset', | ||
'inset-block', | ||
'inset-block-end', | ||
'inset-block-start', | ||
'inset-inline', | ||
'inset-inline-end', | ||
'inset-inline-start', | ||
'isolation', | ||
'kerning', | ||
'justify-content', | ||
'justify-items', | ||
'justify-self', | ||
'left', | ||
'letter-spacing', | ||
'lighting-color', | ||
'line-break', | ||
@@ -442,2 +533,7 @@ 'line-height', | ||
'list-style-type', | ||
'marker', | ||
'marker-end', | ||
'marker-mid', | ||
'marker-start', | ||
'mask', | ||
'margin', | ||
@@ -524,2 +620,3 @@ 'margin-block', | ||
'quotes', | ||
'r', | ||
'resize', | ||
@@ -530,3 +627,5 @@ 'rest', | ||
'right', | ||
'rotate', | ||
'row-gap', | ||
'scale', | ||
'scroll-margin', | ||
@@ -563,2 +662,13 @@ 'scroll-margin-block', | ||
'shape-outside', | ||
'shape-rendering', | ||
'stop-color', | ||
'stop-opacity', | ||
'stroke', | ||
'stroke-dasharray', | ||
'stroke-dashoffset', | ||
'stroke-linecap', | ||
'stroke-linejoin', | ||
'stroke-miterlimit', | ||
'stroke-opacity', | ||
'stroke-width', | ||
'speak', | ||
@@ -569,2 +679,3 @@ 'speak-as', | ||
'table-layout', | ||
'text-anchor', | ||
'text-align', | ||
@@ -577,3 +688,5 @@ 'text-align-all', | ||
'text-decoration-line', | ||
'text-decoration-skip-ink', | ||
'text-decoration-style', | ||
'text-decoration-thickness', | ||
'text-emphasis', | ||
@@ -590,2 +703,3 @@ 'text-emphasis-color', | ||
'text-transform', | ||
'text-underline-offset', | ||
'text-underline-position', | ||
@@ -602,3 +716,5 @@ 'top', | ||
'transition-timing-function', | ||
'translate', | ||
'unicode-bidi', | ||
'vector-effect', | ||
'vertical-align', | ||
@@ -622,9 +738,9 @@ 'visibility', | ||
'writing-mode', | ||
'x', | ||
'y', | ||
'z-index' | ||
// reverse makes sure longer attributes `font-weight` are matched fully | ||
// instead of getting false positives on say `font` | ||
].reverse(); | ||
].sort().reverse(); | ||
// some grammars use them all as a single group | ||
const PSEUDO_SELECTORS = PSEUDO_CLASSES.concat(PSEUDO_ELEMENTS); | ||
const PSEUDO_SELECTORS = PSEUDO_CLASSES.concat(PSEUDO_ELEMENTS).sort().reverse(); | ||
@@ -631,0 +747,0 @@ /* |
@@ -66,40 +66,43 @@ /* | ||
// TODO: split into different categories of keywords | ||
keywords: | ||
'begin end true false declare define global ' | ||
+ 'constant private linker_private internal ' | ||
+ 'available_externally linkonce linkonce_odr weak ' | ||
+ 'weak_odr appending dllimport dllexport common ' | ||
+ 'default hidden protected extern_weak external ' | ||
+ 'thread_local zeroinitializer undef null to tail ' | ||
+ 'target triple datalayout volatile nuw nsw nnan ' | ||
+ 'ninf nsz arcp fast exact inbounds align ' | ||
+ 'addrspace section alias module asm sideeffect ' | ||
+ 'gc dbg linker_private_weak attributes blockaddress ' | ||
+ 'initialexec localdynamic localexec prefix unnamed_addr ' | ||
+ 'ccc fastcc coldcc x86_stdcallcc x86_fastcallcc ' | ||
+ 'arm_apcscc arm_aapcscc arm_aapcs_vfpcc ptx_device ' | ||
+ 'ptx_kernel intel_ocl_bicc msp430_intrcc spir_func ' | ||
+ 'spir_kernel x86_64_sysvcc x86_64_win64cc x86_thiscallcc ' | ||
+ 'cc c signext zeroext inreg sret nounwind ' | ||
+ 'noreturn noalias nocapture byval nest readnone ' | ||
+ 'readonly inlinehint noinline alwaysinline optsize ssp ' | ||
+ 'sspreq noredzone noimplicitfloat naked builtin cold ' | ||
+ 'nobuiltin noduplicate nonlazybind optnone returns_twice ' | ||
+ 'sanitize_address sanitize_memory sanitize_thread sspstrong ' | ||
+ 'uwtable returned type opaque eq ne slt sgt ' | ||
+ 'sle sge ult ugt ule uge oeq one olt ogt ' | ||
+ 'ole oge ord uno ueq une x acq_rel acquire ' | ||
+ 'alignstack atomic catch cleanup filter inteldialect ' | ||
+ 'max min monotonic nand personality release seq_cst ' | ||
+ 'singlethread umax umin unordered xchg add fadd ' | ||
+ 'sub fsub mul fmul udiv sdiv fdiv urem srem ' | ||
+ 'frem shl lshr ashr and or xor icmp fcmp ' | ||
+ 'phi call trunc zext sext fptrunc fpext uitofp ' | ||
+ 'sitofp fptoui fptosi inttoptr ptrtoint bitcast ' | ||
+ 'addrspacecast select va_arg ret br switch invoke ' | ||
+ 'unwind unreachable indirectbr landingpad resume ' | ||
+ 'malloc alloca free load store getelementptr ' | ||
+ 'extractelement insertelement shufflevector getresult ' | ||
+ 'extractvalue insertvalue atomicrmw cmpxchg fence ' | ||
+ 'argmemonly double', | ||
keywords: { | ||
keyword: 'begin end true false declare define global ' | ||
+ 'constant private linker_private internal ' | ||
+ 'available_externally linkonce linkonce_odr weak ' | ||
+ 'weak_odr appending dllimport dllexport common ' | ||
+ 'default hidden protected extern_weak external ' | ||
+ 'thread_local zeroinitializer undef null to tail ' | ||
+ 'target triple datalayout volatile nuw nsw nnan ' | ||
+ 'ninf nsz arcp fast exact inbounds align ' | ||
+ 'addrspace section alias module asm sideeffect ' | ||
+ 'gc dbg linker_private_weak attributes blockaddress ' | ||
+ 'initialexec localdynamic localexec prefix unnamed_addr ' | ||
+ 'ccc fastcc coldcc x86_stdcallcc x86_fastcallcc ' | ||
+ 'arm_apcscc arm_aapcscc arm_aapcs_vfpcc ptx_device ' | ||
+ 'ptx_kernel intel_ocl_bicc msp430_intrcc spir_func ' | ||
+ 'spir_kernel x86_64_sysvcc x86_64_win64cc x86_thiscallcc ' | ||
+ 'cc c signext zeroext inreg sret nounwind ' | ||
+ 'noreturn noalias nocapture byval nest readnone ' | ||
+ 'readonly inlinehint noinline alwaysinline optsize ssp ' | ||
+ 'sspreq noredzone noimplicitfloat naked builtin cold ' | ||
+ 'nobuiltin noduplicate nonlazybind optnone returns_twice ' | ||
+ 'sanitize_address sanitize_memory sanitize_thread sspstrong ' | ||
+ 'uwtable returned type opaque eq ne slt sgt ' | ||
+ 'sle sge ult ugt ule uge oeq one olt ogt ' | ||
+ 'ole oge ord uno ueq une x acq_rel acquire ' | ||
+ 'alignstack atomic catch cleanup filter inteldialect ' | ||
+ 'max min monotonic nand personality release seq_cst ' | ||
+ 'singlethread umax umin unordered xchg add fadd ' | ||
+ 'sub fsub mul fmul udiv sdiv fdiv urem srem ' | ||
+ 'frem shl lshr ashr and or xor icmp fcmp ' | ||
+ 'phi call trunc zext sext fptrunc fpext uitofp ' | ||
+ 'sitofp fptoui fptosi inttoptr ptrtoint bitcast ' | ||
+ 'addrspacecast select va_arg ret br switch invoke ' | ||
+ 'unwind unreachable indirectbr landingpad resume ' | ||
+ 'malloc alloca free load store getelementptr ' | ||
+ 'extractelement insertelement shufflevector getresult ' | ||
+ 'extractvalue insertvalue atomicrmw cmpxchg fence ' | ||
+ 'argmemonly', | ||
type: 'void half bfloat float double fp128 x86_fp80 ppc_fp128 ' | ||
+ 'x86_amx x86_mmx ptr label token metadata opaque' | ||
}, | ||
contains: [ | ||
@@ -106,0 +109,0 @@ TYPE, |
@@ -5,3 +5,3 @@ /* | ||
Author: Andrew Fedorov <dmmdrs@mail.ru> | ||
Category: common, scripting | ||
Category: common, gaming, scripting | ||
Website: https://www.lua.org | ||
@@ -8,0 +8,0 @@ */ |
@@ -6,3 +6,3 @@ /* | ||
Website: https://www.gnu.org/software/make/manual/html_node/Introduction.html | ||
Category: common | ||
Category: common, build-system | ||
*/ | ||
@@ -9,0 +9,0 @@ |
@@ -219,2 +219,8 @@ /* | ||
const ENTITY = { | ||
//https://spec.commonmark.org/0.31.2/#entity-references | ||
scope: 'literal', | ||
match: /&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/ | ||
}; | ||
return { | ||
@@ -237,3 +243,4 @@ name: 'Markdown', | ||
LINK, | ||
LINK_REFERENCE | ||
LINK_REFERENCE, | ||
ENTITY | ||
] | ||
@@ -240,0 +247,0 @@ }; |
@@ -6,2 +6,3 @@ /* | ||
Website: https://www.mercurylang.org | ||
Category: functional | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -6,2 +6,3 @@ /* | ||
Website: https://blitzresearch.itch.io/monkey2 | ||
Category: gaming | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -7,2 +7,3 @@ /* | ||
Website: https://www.couchbase.com/products/n1ql | ||
Category: database | ||
*/ | ||
@@ -9,0 +10,0 @@ |
@@ -6,2 +6,3 @@ /* | ||
Website: http://nixos.org/nix | ||
Category: system | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -6,2 +6,3 @@ /* | ||
Website: https://nsis.sourceforge.io/Main_Page | ||
Category: scripting | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -6,2 +6,3 @@ /* | ||
Website: https://www.elementscompiler.com/elements/default.aspx | ||
Category: build-system | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -29,2 +29,3 @@ /* | ||
'chroot', | ||
'class', | ||
'close', | ||
@@ -59,2 +60,3 @@ 'closedir', | ||
'fcntl', | ||
'field', | ||
'fileno', | ||
@@ -119,2 +121,3 @@ 'flock', | ||
'map', | ||
'method', | ||
'mkdir', | ||
@@ -264,15 +267,41 @@ 'msgctl', | ||
}; | ||
const VAR = { variants: [ | ||
{ begin: /\$\d/ }, | ||
{ begin: regex.concat( | ||
/[$%@](\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/, | ||
// negative look-ahead tries to avoid matching patterns that are not | ||
// Perl at all like $ident$, @ident@, etc. | ||
`(?![A-Za-z])(?![@$%])` | ||
) }, | ||
{ | ||
begin: /[$%@][^\s\w{]/, | ||
relevance: 0 | ||
} | ||
] }; | ||
const ATTR = { | ||
scope: 'attr', | ||
match: /\s+:\s*\w+(\s*\(.*?\))?/, | ||
}; | ||
const VAR = { | ||
scope: 'variable', | ||
variants: [ | ||
{ begin: /\$\d/ }, | ||
{ begin: regex.concat( | ||
/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/, | ||
// negative look-ahead tries to avoid matching patterns that are not | ||
// Perl at all like $ident$, @ident@, etc. | ||
`(?![A-Za-z])(?![@$%])` | ||
) | ||
}, | ||
{ | ||
// Only $= is a special Perl variable and one can't declare @= or %=. | ||
begin: /[$%@](?!")[^\s\w{=]|\$=/, | ||
relevance: 0 | ||
} | ||
], | ||
contains: [ ATTR ], | ||
}; | ||
const NUMBER = { | ||
className: 'number', | ||
variants: [ | ||
// decimal numbers: | ||
// include the case where a number starts with a dot (eg. .9), and | ||
// the leading 0? avoids mixing the first and second match on 0.x cases | ||
{ match: /0?\.[0-9][0-9_]+\b/ }, | ||
// include the special versioned number (eg. v5.38) | ||
{ match: /\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/ }, | ||
// non-decimal numbers: | ||
{ match: /\b0[0-7][0-7_]*\b/ }, | ||
{ match: /\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/ }, | ||
{ match: /\b0b[0-1][0-1_]*\b/ }, | ||
], | ||
relevance: 0 | ||
}; | ||
const STRING_CONTAINS = [ | ||
@@ -392,7 +421,3 @@ hljs.BACKSLASH_ESCAPE, | ||
}, | ||
{ | ||
className: 'number', | ||
begin: '(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b', | ||
relevance: 0 | ||
}, | ||
NUMBER, | ||
{ // regexp container | ||
@@ -439,9 +464,17 @@ begin: '(\\/\\/|' + hljs.RE_STARTERS_RE + '|\\b(split|return|print|reverse|grep)\\b)\\s*', | ||
className: 'function', | ||
beginKeywords: 'sub', | ||
beginKeywords: 'sub method', | ||
end: '(\\s*\\(.*?\\))?[;{]', | ||
excludeEnd: true, | ||
relevance: 5, | ||
contains: [ hljs.TITLE_MODE ] | ||
contains: [ hljs.TITLE_MODE, ATTR ] | ||
}, | ||
{ | ||
className: 'class', | ||
beginKeywords: 'class', | ||
end: '[;{]', | ||
excludeEnd: true, | ||
relevance: 5, | ||
contains: [ hljs.TITLE_MODE, ATTR, NUMBER ] | ||
}, | ||
{ | ||
begin: '-\\w\\b', | ||
@@ -448,0 +481,0 @@ relevance: 0 |
@@ -17,2 +17,3 @@ /* | ||
some names highlighted while others not looks ugly. | ||
Category: database | ||
*/ | ||
@@ -19,0 +20,0 @@ |
@@ -7,2 +7,3 @@ /* | ||
Website: https://www.ponylang.io | ||
Category: system | ||
*/ | ||
@@ -9,0 +10,0 @@ |
@@ -7,2 +7,3 @@ /* | ||
Website: https://docs.microsoft.com/en-us/powershell/ | ||
Category: scripting | ||
*/ | ||
@@ -9,0 +10,0 @@ |
@@ -6,2 +6,3 @@ /* | ||
Website: https://en.wikipedia.org/wiki/Prolog | ||
Category: functional | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -7,2 +7,3 @@ /* | ||
Website: https://www.purebasic.com | ||
Category: system | ||
*/ | ||
@@ -9,0 +10,0 @@ |
@@ -376,3 +376,4 @@ /* | ||
// very common convention | ||
begin: /\bself\b/ | ||
scope: 'variable.language', | ||
match: /\bself\b/ | ||
}, | ||
@@ -385,2 +386,3 @@ { | ||
}, | ||
{ match: /\bor\b/, scope: "keyword" }, | ||
STRING, | ||
@@ -387,0 +389,0 @@ COMMENT_TYPE, |
@@ -7,2 +7,3 @@ /* | ||
Website: https://kx.com/connect-with-us/developers/ | ||
Category: enterprise, functional, database | ||
*/ | ||
@@ -9,0 +10,0 @@ |
@@ -6,2 +6,3 @@ /* | ||
Website: https://wiki.mikrotik.com/wiki/Manual:Scripting | ||
Category: scripting | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -7,3 +7,3 @@ /* | ||
Contributors: Peter Leonov <gojpeg@yandex.ru>, Vasily Polovnyov <vast@whiteants.net>, Loren Segal <lsegal@soen.ca>, Pascal Hurni <phi@ruby-reactive.org>, Cedric Sohrauer <sohrauer@googlemail.com> | ||
Category: common | ||
Category: common, scripting | ||
*/ | ||
@@ -10,0 +10,0 @@ |
@@ -10,4 +10,11 @@ /* | ||
/** @type LanguageFn */ | ||
function rust(hljs) { | ||
const regex = hljs.regex; | ||
// ============================================ | ||
// Added to support the r# keyword, which is a raw identifier in Rust. | ||
const RAW_IDENTIFIER = /(r#)?/; | ||
const UNDERSCORE_IDENT_RE = regex.concat(RAW_IDENTIFIER, hljs.UNDERSCORE_IDENT_RE); | ||
const IDENT_RE = regex.concat(RAW_IDENTIFIER, hljs.IDENT_RE); | ||
// ============================================ | ||
const FUNCTION_INVOKE = { | ||
@@ -19,3 +26,3 @@ className: "title.function.invoke", | ||
/(?!let|for|while|if|else|match\b)/, | ||
hljs.IDENT_RE, | ||
IDENT_RE, | ||
regex.lookahead(/\s*\(/)) | ||
@@ -69,2 +76,3 @@ }; | ||
"typeof", | ||
"union", | ||
"unsafe", | ||
@@ -222,3 +230,3 @@ "unsized", | ||
/\s+/, | ||
hljs.UNDERSCORE_IDENT_RE | ||
UNDERSCORE_IDENT_RE | ||
], | ||
@@ -238,3 +246,6 @@ className: { | ||
begin: /"/, | ||
end: /"/ | ||
end: /"/, | ||
contains: [ | ||
hljs.BACKSLASH_ESCAPE | ||
] | ||
} | ||
@@ -248,3 +259,3 @@ ] | ||
/(?:mut\s+)?/, | ||
hljs.UNDERSCORE_IDENT_RE | ||
UNDERSCORE_IDENT_RE | ||
], | ||
@@ -262,3 +273,3 @@ className: { | ||
/\s+/, | ||
hljs.UNDERSCORE_IDENT_RE, | ||
UNDERSCORE_IDENT_RE, | ||
/\s+/, | ||
@@ -277,3 +288,3 @@ /in/ | ||
/\s+/, | ||
hljs.UNDERSCORE_IDENT_RE | ||
UNDERSCORE_IDENT_RE | ||
], | ||
@@ -289,3 +300,3 @@ className: { | ||
/\s+/, | ||
hljs.UNDERSCORE_IDENT_RE | ||
UNDERSCORE_IDENT_RE | ||
], | ||
@@ -292,0 +303,0 @@ className: { |
@@ -5,2 +5,3 @@ /* | ||
Description: Syntax Highlighting for SAS | ||
Category: scientific | ||
*/ | ||
@@ -7,0 +8,0 @@ |
@@ -46,3 +46,3 @@ const MODES = (hljs) => { | ||
const TAGS = [ | ||
const HTML_TAGS = [ | ||
'a', | ||
@@ -99,3 +99,6 @@ 'abbr', | ||
'ol', | ||
'optgroup', | ||
'option', | ||
'p', | ||
'picture', | ||
'q', | ||
@@ -105,2 +108,4 @@ 'quote', | ||
'section', | ||
'select', | ||
'source', | ||
'span', | ||
@@ -124,2 +129,54 @@ 'strong', | ||
const SVG_TAGS = [ | ||
'defs', | ||
'g', | ||
'marker', | ||
'mask', | ||
'pattern', | ||
'svg', | ||
'switch', | ||
'symbol', | ||
'feBlend', | ||
'feColorMatrix', | ||
'feComponentTransfer', | ||
'feComposite', | ||
'feConvolveMatrix', | ||
'feDiffuseLighting', | ||
'feDisplacementMap', | ||
'feFlood', | ||
'feGaussianBlur', | ||
'feImage', | ||
'feMerge', | ||
'feMorphology', | ||
'feOffset', | ||
'feSpecularLighting', | ||
'feTile', | ||
'feTurbulence', | ||
'linearGradient', | ||
'radialGradient', | ||
'stop', | ||
'circle', | ||
'ellipse', | ||
'image', | ||
'line', | ||
'path', | ||
'polygon', | ||
'polyline', | ||
'rect', | ||
'text', | ||
'use', | ||
'textPath', | ||
'tspan', | ||
'foreignObject', | ||
'clipPath' | ||
]; | ||
const TAGS = [ | ||
...HTML_TAGS, | ||
...SVG_TAGS, | ||
]; | ||
// Sorting, then reversing makes sure longer attributes/elements like | ||
// `font-weight` are matched fully instead of getting false positives on say `font` | ||
const MEDIA_FEATURES = [ | ||
@@ -160,3 +217,3 @@ 'any-hover', | ||
'max-height' | ||
]; | ||
].sort().reverse(); | ||
@@ -224,3 +281,3 @@ // https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes | ||
'where' // where() | ||
]; | ||
].sort().reverse(); | ||
@@ -243,8 +300,10 @@ // https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-elements | ||
'spelling-error' | ||
]; | ||
].sort().reverse(); | ||
const ATTRIBUTES = [ | ||
'accent-color', | ||
'align-content', | ||
'align-items', | ||
'align-self', | ||
'alignment-baseline', | ||
'all', | ||
@@ -260,2 +319,3 @@ 'animation', | ||
'animation-timing-function', | ||
'appearance', | ||
'backface-visibility', | ||
@@ -272,2 +332,3 @@ 'background', | ||
'background-size', | ||
'baseline-shift', | ||
'block-size', | ||
@@ -319,2 +380,4 @@ 'border', | ||
'border-right', | ||
'border-end-end-radius', | ||
'border-end-start-radius', | ||
'border-right-color', | ||
@@ -324,2 +387,4 @@ 'border-right-style', | ||
'border-spacing', | ||
'border-start-end-radius', | ||
'border-start-start-radius', | ||
'border-style', | ||
@@ -340,2 +405,4 @@ 'border-top', | ||
'break-inside', | ||
'cx', | ||
'cy', | ||
'caption-side', | ||
@@ -348,2 +415,7 @@ 'caret-color', | ||
'color', | ||
'color-interpolation', | ||
'color-interpolation-filters', | ||
'color-profile', | ||
'color-rendering', | ||
'color-scheme', | ||
'column-count', | ||
@@ -370,3 +442,8 @@ 'column-fill', | ||
'display', | ||
'dominant-baseline', | ||
'empty-cells', | ||
'enable-background', | ||
'fill', | ||
'fill-opacity', | ||
'fill-rule', | ||
'filter', | ||
@@ -382,2 +459,4 @@ 'flex', | ||
'flow', | ||
'flood-color', | ||
'flood-opacity', | ||
'font', | ||
@@ -404,2 +483,3 @@ 'font-display', | ||
'gap', | ||
'glyph-orientation-horizontal', | ||
'glyph-orientation-vertical', | ||
@@ -431,6 +511,17 @@ 'grid', | ||
'inline-size', | ||
'inset', | ||
'inset-block', | ||
'inset-block-end', | ||
'inset-block-start', | ||
'inset-inline', | ||
'inset-inline-end', | ||
'inset-inline-start', | ||
'isolation', | ||
'kerning', | ||
'justify-content', | ||
'justify-items', | ||
'justify-self', | ||
'left', | ||
'letter-spacing', | ||
'lighting-color', | ||
'line-break', | ||
@@ -442,2 +533,7 @@ 'line-height', | ||
'list-style-type', | ||
'marker', | ||
'marker-end', | ||
'marker-mid', | ||
'marker-start', | ||
'mask', | ||
'margin', | ||
@@ -524,2 +620,3 @@ 'margin-block', | ||
'quotes', | ||
'r', | ||
'resize', | ||
@@ -530,3 +627,5 @@ 'rest', | ||
'right', | ||
'rotate', | ||
'row-gap', | ||
'scale', | ||
'scroll-margin', | ||
@@ -563,2 +662,13 @@ 'scroll-margin-block', | ||
'shape-outside', | ||
'shape-rendering', | ||
'stop-color', | ||
'stop-opacity', | ||
'stroke', | ||
'stroke-dasharray', | ||
'stroke-dashoffset', | ||
'stroke-linecap', | ||
'stroke-linejoin', | ||
'stroke-miterlimit', | ||
'stroke-opacity', | ||
'stroke-width', | ||
'speak', | ||
@@ -569,2 +679,3 @@ 'speak-as', | ||
'table-layout', | ||
'text-anchor', | ||
'text-align', | ||
@@ -577,3 +688,5 @@ 'text-align-all', | ||
'text-decoration-line', | ||
'text-decoration-skip-ink', | ||
'text-decoration-style', | ||
'text-decoration-thickness', | ||
'text-emphasis', | ||
@@ -590,2 +703,3 @@ 'text-emphasis-color', | ||
'text-transform', | ||
'text-underline-offset', | ||
'text-underline-position', | ||
@@ -602,3 +716,5 @@ 'top', | ||
'transition-timing-function', | ||
'translate', | ||
'unicode-bidi', | ||
'vector-effect', | ||
'vertical-align', | ||
@@ -622,6 +738,6 @@ 'visibility', | ||
'writing-mode', | ||
'x', | ||
'y', | ||
'z-index' | ||
// reverse makes sure longer attributes `font-weight` are matched fully | ||
// instead of getting false positives on say `font` | ||
].reverse(); | ||
].sort().reverse(); | ||
@@ -628,0 +744,0 @@ /* |
@@ -6,2 +6,3 @@ /* | ||
Website: https://github.com/JesusFreke/smali | ||
Category: assembler | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -6,2 +6,3 @@ /* | ||
Website: https://en.wikipedia.org/wiki/Smalltalk | ||
Category: system | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -6,2 +6,3 @@ /* | ||
Website: https://en.wikipedia.org/wiki/ISO_10303-21 | ||
Category: syntax | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -46,3 +46,3 @@ const MODES = (hljs) => { | ||
const TAGS = [ | ||
const HTML_TAGS = [ | ||
'a', | ||
@@ -99,3 +99,6 @@ 'abbr', | ||
'ol', | ||
'optgroup', | ||
'option', | ||
'p', | ||
'picture', | ||
'q', | ||
@@ -105,2 +108,4 @@ 'quote', | ||
'section', | ||
'select', | ||
'source', | ||
'span', | ||
@@ -124,2 +129,54 @@ 'strong', | ||
const SVG_TAGS = [ | ||
'defs', | ||
'g', | ||
'marker', | ||
'mask', | ||
'pattern', | ||
'svg', | ||
'switch', | ||
'symbol', | ||
'feBlend', | ||
'feColorMatrix', | ||
'feComponentTransfer', | ||
'feComposite', | ||
'feConvolveMatrix', | ||
'feDiffuseLighting', | ||
'feDisplacementMap', | ||
'feFlood', | ||
'feGaussianBlur', | ||
'feImage', | ||
'feMerge', | ||
'feMorphology', | ||
'feOffset', | ||
'feSpecularLighting', | ||
'feTile', | ||
'feTurbulence', | ||
'linearGradient', | ||
'radialGradient', | ||
'stop', | ||
'circle', | ||
'ellipse', | ||
'image', | ||
'line', | ||
'path', | ||
'polygon', | ||
'polyline', | ||
'rect', | ||
'text', | ||
'use', | ||
'textPath', | ||
'tspan', | ||
'foreignObject', | ||
'clipPath' | ||
]; | ||
const TAGS = [ | ||
...HTML_TAGS, | ||
...SVG_TAGS, | ||
]; | ||
// Sorting, then reversing makes sure longer attributes/elements like | ||
// `font-weight` are matched fully instead of getting false positives on say `font` | ||
const MEDIA_FEATURES = [ | ||
@@ -160,3 +217,3 @@ 'any-hover', | ||
'max-height' | ||
]; | ||
].sort().reverse(); | ||
@@ -224,3 +281,3 @@ // https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes | ||
'where' // where() | ||
]; | ||
].sort().reverse(); | ||
@@ -243,8 +300,10 @@ // https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-elements | ||
'spelling-error' | ||
]; | ||
].sort().reverse(); | ||
const ATTRIBUTES = [ | ||
'accent-color', | ||
'align-content', | ||
'align-items', | ||
'align-self', | ||
'alignment-baseline', | ||
'all', | ||
@@ -260,2 +319,3 @@ 'animation', | ||
'animation-timing-function', | ||
'appearance', | ||
'backface-visibility', | ||
@@ -272,2 +332,3 @@ 'background', | ||
'background-size', | ||
'baseline-shift', | ||
'block-size', | ||
@@ -319,2 +380,4 @@ 'border', | ||
'border-right', | ||
'border-end-end-radius', | ||
'border-end-start-radius', | ||
'border-right-color', | ||
@@ -324,2 +387,4 @@ 'border-right-style', | ||
'border-spacing', | ||
'border-start-end-radius', | ||
'border-start-start-radius', | ||
'border-style', | ||
@@ -340,2 +405,4 @@ 'border-top', | ||
'break-inside', | ||
'cx', | ||
'cy', | ||
'caption-side', | ||
@@ -348,2 +415,7 @@ 'caret-color', | ||
'color', | ||
'color-interpolation', | ||
'color-interpolation-filters', | ||
'color-profile', | ||
'color-rendering', | ||
'color-scheme', | ||
'column-count', | ||
@@ -370,3 +442,8 @@ 'column-fill', | ||
'display', | ||
'dominant-baseline', | ||
'empty-cells', | ||
'enable-background', | ||
'fill', | ||
'fill-opacity', | ||
'fill-rule', | ||
'filter', | ||
@@ -382,2 +459,4 @@ 'flex', | ||
'flow', | ||
'flood-color', | ||
'flood-opacity', | ||
'font', | ||
@@ -404,2 +483,3 @@ 'font-display', | ||
'gap', | ||
'glyph-orientation-horizontal', | ||
'glyph-orientation-vertical', | ||
@@ -431,6 +511,17 @@ 'grid', | ||
'inline-size', | ||
'inset', | ||
'inset-block', | ||
'inset-block-end', | ||
'inset-block-start', | ||
'inset-inline', | ||
'inset-inline-end', | ||
'inset-inline-start', | ||
'isolation', | ||
'kerning', | ||
'justify-content', | ||
'justify-items', | ||
'justify-self', | ||
'left', | ||
'letter-spacing', | ||
'lighting-color', | ||
'line-break', | ||
@@ -442,2 +533,7 @@ 'line-height', | ||
'list-style-type', | ||
'marker', | ||
'marker-end', | ||
'marker-mid', | ||
'marker-start', | ||
'mask', | ||
'margin', | ||
@@ -524,2 +620,3 @@ 'margin-block', | ||
'quotes', | ||
'r', | ||
'resize', | ||
@@ -530,3 +627,5 @@ 'rest', | ||
'right', | ||
'rotate', | ||
'row-gap', | ||
'scale', | ||
'scroll-margin', | ||
@@ -563,2 +662,13 @@ 'scroll-margin-block', | ||
'shape-outside', | ||
'shape-rendering', | ||
'stop-color', | ||
'stop-opacity', | ||
'stroke', | ||
'stroke-dasharray', | ||
'stroke-dashoffset', | ||
'stroke-linecap', | ||
'stroke-linejoin', | ||
'stroke-miterlimit', | ||
'stroke-opacity', | ||
'stroke-width', | ||
'speak', | ||
@@ -569,2 +679,3 @@ 'speak-as', | ||
'table-layout', | ||
'text-anchor', | ||
'text-align', | ||
@@ -577,3 +688,5 @@ 'text-align-all', | ||
'text-decoration-line', | ||
'text-decoration-skip-ink', | ||
'text-decoration-style', | ||
'text-decoration-thickness', | ||
'text-emphasis', | ||
@@ -590,2 +703,3 @@ 'text-emphasis-color', | ||
'text-transform', | ||
'text-underline-offset', | ||
'text-underline-position', | ||
@@ -602,3 +716,5 @@ 'top', | ||
'transition-timing-function', | ||
'translate', | ||
'unicode-bidi', | ||
'vector-effect', | ||
'vertical-align', | ||
@@ -622,6 +738,6 @@ 'visibility', | ||
'writing-mode', | ||
'x', | ||
'y', | ||
'z-index' | ||
// reverse makes sure longer attributes `font-weight` are matched fully | ||
// instead of getting false positives on say `font` | ||
].reverse(); | ||
].sort().reverse(); | ||
@@ -628,0 +744,0 @@ /* |
@@ -5,2 +5,3 @@ /* | ||
Website: https://pypi.org/project/python-subunit/ | ||
Category: protocols | ||
*/ | ||
@@ -7,0 +8,0 @@ |
@@ -156,2 +156,3 @@ /** | ||
'override', // contextual | ||
'package', | ||
'postfix', // contextual | ||
@@ -653,6 +654,8 @@ 'precedencegroup', | ||
}; | ||
const KEYWORD_ATTRIBUTE = { | ||
scope: 'keyword', | ||
match: concat(/@/, either(...keywordAttributes)) | ||
match: concat(/@/, either(...keywordAttributes), lookahead(either(/\(/, /\s+/))), | ||
}; | ||
const USER_DEFINED_ATTRIBUTE = { | ||
@@ -662,2 +665,3 @@ scope: 'meta', | ||
}; | ||
const ATTRIBUTES = [ | ||
@@ -855,2 +859,33 @@ AVAILABLE_ATTRIBUTE, | ||
const TYPE_DECLARATION = { | ||
begin: [ | ||
/(struct|protocol|class|extension|enum|actor)/, | ||
/\s+/, | ||
identifier, | ||
/\s*/, | ||
], | ||
beginScope: { | ||
1: "keyword", | ||
3: "title.class" | ||
}, | ||
keywords: KEYWORDS, | ||
contains: [ | ||
GENERIC_PARAMETERS, | ||
...KEYWORD_MODES, | ||
{ | ||
begin: /:/, | ||
end: /\{/, | ||
keywords: KEYWORDS, | ||
contains: [ | ||
{ | ||
scope: "title.class.inherited", | ||
match: typeIdentifier, | ||
}, | ||
...KEYWORD_MODES, | ||
], | ||
relevance: 0, | ||
}, | ||
] | ||
}; | ||
// Add supported submodes to string interpolation. | ||
@@ -889,15 +924,3 @@ for (const variant of STRING.variants) { | ||
INIT_SUBSCRIPT, | ||
{ | ||
beginKeywords: 'struct protocol class extension enum actor', | ||
end: '\\{', | ||
excludeEnd: true, | ||
keywords: KEYWORDS, | ||
contains: [ | ||
hljs.inherit(hljs.TITLE_MODE, { | ||
className: "title.class", | ||
begin: /[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/ | ||
}), | ||
...KEYWORD_MODES | ||
] | ||
}, | ||
TYPE_DECLARATION, | ||
OPERATOR_DECLARATION, | ||
@@ -904,0 +927,0 @@ PRECEDENCEGROUP, |
@@ -6,2 +6,3 @@ /* | ||
Website: https://picard.musicbrainz.org | ||
Category: scripting | ||
*/ | ||
@@ -8,0 +9,0 @@ function taggerscript(hljs) { |
@@ -6,2 +6,3 @@ /* | ||
Website: https://www.tcl.tk/about/language.html | ||
Category: scripting | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -5,2 +5,3 @@ /* | ||
Description: FANUC TP programming language (TPP). | ||
Category: hardware | ||
*/ | ||
@@ -7,0 +8,0 @@ |
@@ -293,3 +293,3 @@ const IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*'; | ||
const HTML_TEMPLATE = { | ||
begin: 'html`', | ||
begin: '\.?html`', | ||
end: '', | ||
@@ -307,3 +307,3 @@ starts: { | ||
const CSS_TEMPLATE = { | ||
begin: 'css`', | ||
begin: '\.?css`', | ||
end: '', | ||
@@ -321,3 +321,3 @@ starts: { | ||
const GRAPHQL_TEMPLATE = { | ||
begin: 'gql`', | ||
begin: '\.?gql`', | ||
end: '', | ||
@@ -419,3 +419,3 @@ starts: { | ||
{ | ||
begin: /\(/, | ||
begin: /(\s*)\(/, | ||
end: /\)/, | ||
@@ -428,3 +428,4 @@ keywords: KEYWORDS$1, | ||
className: 'params', | ||
begin: /\(/, | ||
// convert this to negative lookbehind in v12 | ||
begin: /(\s*)\(/, // to match the parms with | ||
end: /\)/, | ||
@@ -552,4 +553,4 @@ excludeBegin: true, | ||
"import" | ||
]), | ||
IDENT_RE$1, regex.lookahead(/\(/)), | ||
].map(x => `${x}\\s*\\(`)), | ||
IDENT_RE$1, regex.lookahead(/\s*\(/)), | ||
className: "title.function", | ||
@@ -675,3 +676,3 @@ relevance: 0 | ||
{ | ||
begin: /\(/, | ||
begin: /(\s*)\(/, | ||
end: /\)/, | ||
@@ -801,6 +802,11 @@ excludeBegin: true, | ||
const NAMESPACE = { | ||
beginKeywords: 'namespace', | ||
end: /\{/, | ||
excludeEnd: true, | ||
contains: [ tsLanguage.exports.CLASS_REFERENCE ] | ||
begin: [ | ||
/namespace/, | ||
/\s+/, | ||
hljs.IDENT_RE | ||
], | ||
beginScope: { | ||
1: "keyword", | ||
3: "title.class" | ||
} | ||
}; | ||
@@ -824,3 +830,3 @@ const INTERFACE = { | ||
"type", | ||
"namespace", | ||
// "namespace", | ||
"interface", | ||
@@ -835,4 +841,12 @@ "public", | ||
"enum", | ||
"override" | ||
"override", | ||
"satisfies" | ||
]; | ||
/* | ||
namespace is a TS keyword but it's fine to use it as a variable name too. | ||
const message = 'foo'; | ||
const namespace = 'bar'; | ||
*/ | ||
const KEYWORDS$1 = { | ||
@@ -863,2 +877,9 @@ $pattern: IDENT_RE, | ||
tsLanguage.exports.PARAMS_CONTAINS.push(DECORATOR); | ||
// highlight the function params | ||
const ATTRIBUTE_HIGHLIGHT = tsLanguage.contains.find(c => c.className === "attr"); | ||
tsLanguage.exports.PARAMS_CONTAINS.push([ | ||
tsLanguage.exports.CLASS_REFERENCE, // class reference for highlighting the params types | ||
ATTRIBUTE_HIGHLIGHT, // highlight the params key | ||
]); | ||
tsLanguage.contains = tsLanguage.contains.concat([ | ||
@@ -865,0 +886,0 @@ DECORATOR, |
@@ -6,2 +6,3 @@ /* | ||
Website: https://wiki.gnome.org/Projects/Vala | ||
Category: system | ||
*/ | ||
@@ -8,0 +9,0 @@ |
@@ -7,2 +7,3 @@ /* | ||
Website: http://www.verilog.com | ||
Category: hardware | ||
*/ | ||
@@ -9,0 +10,0 @@ |
@@ -7,2 +7,3 @@ /* | ||
Website: https://en.wikipedia.org/wiki/VHDL | ||
Category: hardware | ||
*/ | ||
@@ -9,0 +10,0 @@ |
@@ -23,7 +23,8 @@ /* | ||
variants: [ | ||
{ begin: '\\w[\\w :\\/.-]*:(?=[ \t]|$)' }, | ||
{ // double quoted keys | ||
begin: '"\\w[\\w :\\/.-]*":(?=[ \t]|$)' }, | ||
{ // single quoted keys | ||
begin: '\'\\w[\\w :\\/.-]*\':(?=[ \t]|$)' } | ||
// added brackets support | ||
{ begin: /\w[\w :()\./-]*:(?=[ \t]|$)/ }, | ||
{ // double quoted keys - with brackets | ||
begin: /"\w[\w :()\./-]*":(?=[ \t]|$)/ }, | ||
{ // single quoted keys - with brackets | ||
begin: /'\w[\w :()\./-]*':(?=[ \t]|$)/ }, | ||
] | ||
@@ -30,0 +31,0 @@ }; |
@@ -6,2 +6,3 @@ /* | ||
Website: https://zephir-lang.com/en | ||
Category: web | ||
Audit: 2020 | ||
@@ -8,0 +9,0 @@ */ |
@@ -9,3 +9,3 @@ { | ||
"homepage": "https://highlightjs.org/", | ||
"version": "11.9.0", | ||
"version": "11.10.0", | ||
"author": "Josh Goebel <hello@joshgoebel.com>", | ||
@@ -63,11 +63,11 @@ "contributors": [ | ||
"@colors/colors": "^1.6.0", | ||
"@rollup/plugin-commonjs": "^25.0.5", | ||
"@rollup/plugin-commonjs": "^26.0.1", | ||
"@rollup/plugin-json": "^6.0.1", | ||
"@rollup/plugin-node-resolve": "^15.2.3", | ||
"@types/mocha": "^10.0.2", | ||
"@typescript-eslint/eslint-plugin": "^6.7.4", | ||
"@typescript-eslint/parser": "^6.7.4", | ||
"@typescript-eslint/eslint-plugin": "^7.15.0", | ||
"@typescript-eslint/parser": "^7.15.0", | ||
"clean-css": "^5.3.2", | ||
"cli-table": "^0.3.1", | ||
"commander": "^11.0.0", | ||
"commander": "^12.1.0", | ||
"css": "^3.0.0", | ||
@@ -78,3 +78,3 @@ "css-color-names": "^1.0.1", | ||
"dependency-resolver": "^2.0.1", | ||
"eslint": "^8.51.0", | ||
"eslint": "^8.57.0", | ||
"eslint-config-standard": "^17.1.0", | ||
@@ -88,3 +88,3 @@ "eslint-plugin-import": "^2.28.1", | ||
"http-server": "^14.1.1", | ||
"jsdom": "^22.1.0", | ||
"jsdom": "^24.1.0", | ||
"lodash": "^4.17.20", | ||
@@ -91,0 +91,0 @@ "mocha": "^10.2.0", |
@@ -328,6 +328,6 @@ # Highlight.js | ||
```html | ||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css"> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script> | ||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/styles/default.min.css"> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/highlight.min.js"></script> | ||
<!-- and it's easy to individually load additional languages --> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/go.min.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/languages/go.min.js"></script> | ||
``` | ||
@@ -338,7 +338,7 @@ | ||
````html | ||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/dark.min.css"> | ||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/styles/dark.min.css"> | ||
<script type="module"> | ||
import hljs from 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/es/highlight.min.js'; | ||
import hljs from 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/es/highlight.min.js'; | ||
// and it's easy to individually load additional languages | ||
import go from 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/es/languages/go.min.js'; | ||
import go from 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/es/languages/go.min.js'; | ||
hljs.registerLanguage('go', go); | ||
@@ -355,6 +355,6 @@ </script> | ||
```html | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.9.0/build/styles/default.min.css"> | ||
<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.9.0/build/highlight.min.js"></script> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.10.0/build/styles/default.min.css"> | ||
<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.10.0/build/highlight.min.js"></script> | ||
<!-- and it's easy to individually load additional languages --> | ||
<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.9.0/build/languages/go.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.10.0/build/languages/go.min.js"></script> | ||
``` | ||
@@ -365,7 +365,7 @@ | ||
```html | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.9.0/build/styles/default.min.css"> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.10.0/build/styles/default.min.css"> | ||
<script type="module"> | ||
import hljs from 'https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.9.0/build/es/highlight.min.js'; | ||
import hljs from 'https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.10.0/build/es/highlight.min.js'; | ||
// and it's easy to individually load additional languages | ||
import go from 'https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.9.0/build/es/languages/go.min.js'; | ||
import go from 'https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.10.0/build/es/languages/go.min.js'; | ||
hljs.registerLanguage('go', go); | ||
@@ -380,6 +380,6 @@ </script> | ||
```html | ||
<link rel="stylesheet" href="https://unpkg.com/@highlightjs/cdn-assets@11.9.0/styles/default.min.css"> | ||
<script src="https://unpkg.com/@highlightjs/cdn-assets@11.9.0/highlight.min.js"></script> | ||
<link rel="stylesheet" href="https://unpkg.com/@highlightjs/cdn-assets@11.10.0/styles/default.min.css"> | ||
<script src="https://unpkg.com/@highlightjs/cdn-assets@11.10.0/highlight.min.js"></script> | ||
<!-- and it's easy to individually load additional languages --> | ||
<script src="https://unpkg.com/@highlightjs/cdn-assets@11.9.0/languages/go.min.js"></script> | ||
<script src="https://unpkg.com/@highlightjs/cdn-assets@11.10.0/languages/go.min.js"></script> | ||
``` | ||
@@ -390,7 +390,7 @@ | ||
```html | ||
<link rel="stylesheet" href="https://unpkg.com/@highlightjs/cdn-assets@11.9.0/styles/default.min.css"> | ||
<link rel="stylesheet" href="https://unpkg.com/@highlightjs/cdn-assets@11.10.0/styles/default.min.css"> | ||
<script type="module"> | ||
import hljs from 'https://unpkg.com/@highlightjs/cdn-assets@11.9.0/es/highlight.min.js'; | ||
import hljs from 'https://unpkg.com/@highlightjs/cdn-assets@11.10.0/es/highlight.min.js'; | ||
// and it's easy to individually load & register additional languages | ||
import go from 'https://unpkg.com/@highlightjs/cdn-assets@11.9.0/es/languages/go.min.js'; | ||
import go from 'https://unpkg.com/@highlightjs/cdn-assets@11.10.0/es/languages/go.min.js'; | ||
hljs.registerLanguage('go', go); | ||
@@ -397,0 +397,0 @@ </script> |
@@ -48,3 +48,4 @@ # Supported Languages | ||
| CMake | cmake, cmake.in | | | ||
| COBOL | cobol, standard-cobol | [highlightjs-cobol](https://github.com/otterkit/highlightjs-cobol) | | ||
| COBOL | cobol, standard-cobol | [highlightjs-cobol](https://github.com/otterkit/highlightjs-cobol) | | ||
| CODEOWNERS | codeowners | [highlightjs-codeowners](https://github.com/highlightjs/highlightjs-codeowners) | | ||
| Coq | coq | | | ||
@@ -83,3 +84,3 @@ | CSP | csp | | | ||
| Extempore | extempore, xtlang, xtm | [highlightjs-xtlang](https://github.com/highlightjs/highlightjs-xtlang) | | ||
| F# | fsharp, fs | | | ||
| F# | fsharp, fs, fsx, fsi, fsscript | | | ||
| FIX | fix | | | ||
@@ -100,3 +101,3 @@ | Flix | flix | [highlightjs-flix](https://github.com/flix/highlightjs-flix) | | ||
| Gradle | gradle | | | ||
| GraphQL | graphql | | | ||
| GraphQL | graphql, gql | | | ||
| Groovy | groovy | | | ||
@@ -116,7 +117,9 @@ | GSQL | gsql | [highlightjs-gsql](https://github.com/DanBarkus/highlightjs-gsql) | | ||
| Iptables | iptables | [highlightjs-iptables](https://github.com/highlightjs/highlightjs-iptables) | | ||
| JSON | json | | | ||
| JSON | json, jsonc | | | ||
| JSONata | jsonata | [highlightjs-jsonata](https://github.com/DevDimov/highlightjs-jsonata) | | ||
| Java | java, jsp | | | ||
| JavaScript | javascript, js, jsx | | | ||
| Jolie | jolie, iol, ol | [highlightjs-jolie](https://github.com/xiroV/highlightjs-jolie) | | ||
| Julia | julia, julia-repl | | | ||
| Julia | julia, jl | | | ||
| Julia REPL | julia-repl | | | ||
| Kotlin | kotlin, kt | | | ||
@@ -135,2 +138,3 @@ | Lang | | [highlightjs-lang](https://github.com/highlightjs/highlightjs-lang) | ||
| Lua | lua | | | ||
| Luau | luau | [highlightjs-luau](https://github.com/highlightjs/highlightjs-luau) | | ||
| Macaulay2 | macaulay2 | [highlightjs-macaulay2](https://github.com/d-torrance/highlightjs-macaulay2) | | ||
@@ -146,2 +150,3 @@ | Makefile | makefile, mk, mak, make | | | ||
| Mint | mint | [highlightjs-mint](https://github.com/mint-lang/highlightjs-mint) | | ||
| Mirth | mirth | [highlightjs-mirth](https://github.com/highlightjs/highlightjs-mirth) | | ||
| mIRC Scripting Language | mirc, mrc | [highlightjs-mirc](https://github.com/highlightjs/highlightjs-mirc) | | ||
@@ -174,2 +179,3 @@ | Mizar | mizar | | | ||
| Perl | perl, pl, pm | | | ||
| Phix | phix | [highlightjs-phix](https://github.com/highlightjs/highlightjs-phix) | | ||
| Pine Script | pine, pinescript | [highlightjs-pine](https://github.com/jeyllani/highlightjs-pine) | | ||
@@ -197,2 +203,3 @@ | Plaintext | plaintext, txt, text | | | ||
| RenderMan RSL | rsl | | | ||
| ReScript | rescript, res | [highlightjs-rescript](https://github.com/tsnobip/highlightjs-rescript) | | ||
| RiScript | risc, riscript | [highlightjs-riscript](https://github.com/highlightjs/highlightjs-riscript) | | ||
@@ -239,2 +246,3 @@ | RISC-V Assembly | riscv, riscvasm | [highlightjs-riscvasm](https://github.com/highlightjs/highlightjs-riscvasm) | | ||
| Unicorn Rails log | unicorn-rails-log | [highlightjs-unicorn-rails-log](https://github.com/sweetppro/highlightjs-unicorn-rails-log) | | ||
| Unison | unison, u | [highlightjs-unison](https://github.com/highlightjs/highlightjs-unison) | | ||
| VB.Net | vbnet, vb | | | ||
@@ -247,2 +255,3 @@ | VBA | vba | [highlightjs-vba](https://github.com/dullin/highlightjs-vba) | | ||
| Vim Script | vim | | | ||
| WGSL | wgsl | [highlightjs-wgsl](https://github.com/highlightjs/highlightjs-wgsl) | | ||
| X# | xsharp, xs, prg | [highlightjs-xsharp](https://github.com/InfomindsAg/highlightjs-xsharp) | | ||
@@ -257,2 +266,3 @@ | X++ | axapta, x++ | | | ||
| Zephir | zephir, zep | | | ||
| Zig | zig |[highlightjs-zig](https://github.com/fwx5618177/highlightjs-zig) | | ||
<!-- LANGLIST_END --> | ||
@@ -259,0 +269,0 @@ |
@@ -32,3 +32,5 @@ /* eslint-disable no-unused-vars */ | ||
interface PublicApi { | ||
highlight: (codeOrLanguageName: string, optionsOrCode: string | HighlightOptions, ignoreIllegals?: boolean) => HighlightResult | ||
highlight(code: string, options: HighlightOptions): HighlightResult | ||
/** @deprecated use `higlight(code, {lang: ..., ignoreIllegals: ...})` */ | ||
highlight(languageName: string, code: string, ignoreIllegals?: boolean): HighlightResult | ||
highlightAuto: (code: string, languageSubset?: string[]) => AutoHighlightResult | ||
@@ -173,3 +175,3 @@ highlightBlock: (element: HTMLElement) => void | ||
case_insensitive?: boolean | ||
keywords?: string | string[] | Record<string, string | string[]> | ||
keywords?: string | string[] | Record<string, string | string[] | RegExp> | ||
isCompiled?: boolean, | ||
@@ -176,0 +178,0 @@ exports?: any, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5348297
1538
152129