Socket
Socket
Sign inDemoInstall

highlight.js

Package Overview
Dependencies
0
Maintainers
5
Versions
100
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 10.2.1 to 10.3.0

3

lib/index.js

@@ -92,4 +92,2 @@ var hljs = require('./core');

hljs.registerLanguage('javascript', require('./languages/javascript'));
hljs.registerLanguage('typescript', require('./languages/typescript'));
hljs.registerLanguage('javascript.old', require('./languages/javascript.old'));
hljs.registerLanguage('jboss-cli', require('./languages/jboss-cli'));

@@ -183,2 +181,3 @@ hljs.registerLanguage('json', require('./languages/json'));

hljs.registerLanguage('twig', require('./languages/twig'));
hljs.registerLanguage('typescript', require('./languages/typescript'));
hljs.registerLanguage('vala', require('./languages/vala'));

@@ -185,0 +184,0 @@ hljs.registerLanguage('vbnet', require('./languages/vbnet'));

@@ -51,2 +51,8 @@ /*

// """heredoc strings"""
{
className: 'string',
begin: '"""', end: '"""'
},
{ // "strings"

@@ -60,11 +66,10 @@ className: 'string',

// """heredoc strings"""
{
hljs.C_LINE_COMMENT_MODE, // single-line comments
hljs.C_BLOCK_COMMENT_MODE, // comment blocks
{ // metadata
className: 'string',
begin: '"""', end: '"""'
begin: '^\\s*\\[', end: '\\]',
},
hljs.C_LINE_COMMENT_MODE, // single-line comments
hljs.C_BLOCK_COMMENT_MODE, // comment blocks
{ // interface or namespace declaration

@@ -113,3 +118,3 @@ beginKeywords: 'interface namespace', end: '{',

className: 'number',
begin: '(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?f?|\\.\\d+f?)([eE][-+]?\\d+f?)?)'
begin: '(-?)(\\b0[xXbBoOdD][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?f?|\\.\\d+f?)([eE][-+]?\\d+f?)?)'
}

@@ -116,0 +121,0 @@ ]

/*
Language: Microsoft Axapta (now Dynamics 365)
Language: Microsoft X++
Description: X++ is a language used in Microsoft Dynamics 365, Dynamics AX, and Axapta.
Author: Dmitri Roudakov <dmitri@roudakov.ru>

@@ -10,10 +11,142 @@ Website: https://dynamics.microsoft.com/en-us/ax-overview/

function axapta(hljs) {
const BUILT_IN_KEYWORDS = [
'anytype',
'boolean',
'byte',
'char',
'container',
'date',
'double',
'enum',
'guid',
'int',
'int64',
'long',
'real',
'short',
'str',
'utcdatetime',
'var'
];
const LITERAL_KEYWORDS = [
'default',
'false',
'null',
'true',
];
const NORMAL_KEYWORDS = [
'abstract',
'as',
'asc',
'avg',
'break',
'breakpoint',
'by',
'byref',
'case',
'catch',
'changecompany',
'class',
'client',
'client',
'common',
'const',
'continue',
'count',
'crosscompany',
'delegate',
'delete_from',
'desc',
'display',
'div',
'do',
'edit',
'else',
'eventhandler',
'exists',
'extends',
'final',
'finally',
'firstfast',
'firstonly',
'firstonly1',
'firstonly10',
'firstonly100',
'firstonly1000',
'flush',
'for',
'forceliterals',
'forcenestedloop',
'forceplaceholders',
'forceselectorder',
'forupdate',
'from',
'generateonly',
'group',
'hint',
'if',
'implements',
'in',
'index',
'insert_recordset',
'interface',
'internal',
'is',
'join',
'like',
'maxof',
'minof',
'mod',
'namespace',
'new',
'next',
'nofetch',
'notexists',
'optimisticlock',
'order',
'outer',
'pessimisticlock',
'print',
'private',
'protected',
'public',
'readonly',
'repeatableread',
'retry',
'return',
'reverse',
'select',
'server',
'setting',
'static',
'sum',
'super',
'switch',
'this',
'throw',
'try',
'ttsabort',
'ttsbegin',
'ttscommit',
'unchecked',
'update_recordset',
'using',
'validtimestate',
'void',
'where',
'while',
];
const KEYWORDS = {
keyword: NORMAL_KEYWORDS.join(' '),
built_in: BUILT_IN_KEYWORDS.join(' '),
literal: LITERAL_KEYWORDS.join(' ')
};
return {
name: 'Dynamics 365',
keywords: 'false int abstract private char boolean static null if for true ' +
'while long throw finally protected final return void enum else ' +
'break new catch byte super case short default double public try this switch ' +
'continue reverse firstfast firstonly forupdate nofetch sum avg minof maxof count ' +
'order group by asc desc index hint like dispaly edit client server ttsbegin ' +
'ttscommit str real date container anytype common div mod',
name: 'X++',
aliases: ['x++'],
keywords: KEYWORDS,
contains: [

@@ -20,0 +153,0 @@ hljs.C_LINE_COMMENT_MODE,

@@ -13,5 +13,10 @@ /*

const BRACED_VAR = {
begin: /\$\{/, end:/\}/,
begin: /\$\{/,
end:/\}/,
contains: [
{ begin: /:-/, contains: [VAR] } // default values
"self",
{
begin: /:-/,
contains: [ VAR ]
} // default values
]

@@ -32,2 +37,14 @@ };

};
const HERE_DOC = {
begin: /<<-?\s*(?=\w+)/,
starts: {
contains: [
hljs.END_SAME_AS_BEGIN({
begin: /(\w+)/,
end: /(\w+)/,
className: 'string'
})
]
}
};
const QUOTE_STRING = {

@@ -88,3 +105,3 @@ className: 'string',

keywords: {
$pattern: /\b-?[a-z\._-]+\b/,
$pattern: /\b[a-z._-]+\b/,
keyword:

@@ -110,5 +127,3 @@ 'if then else elif fi for while in do done case esac function',

'unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof ' +
'zpty zregexparse zsocket zstyle ztcp',
_:
'-ne -eq -lt -gt -f -d -e -s -l -a' // relevance booster
'zpty zregexparse zsocket zstyle ztcp'
},

@@ -121,2 +136,3 @@ contains: [

hljs.HASH_COMMENT_MODE,
HERE_DOC,
QUOTE_STRING,

@@ -123,0 +139,0 @@ ESCAPED_QUOTE,

@@ -21,2 +21,8 @@ /*

}
// added for historic reasons because `hljs.C_LINE_COMMENT_MODE` does
// not include such support nor can we be sure all the grammars depending
// on it would desire this behavior
var C_LINE_COMMENT_MODE = hljs.COMMENT('//', '$', {
contains: [{begin: /\\\n/}]
});
var DECLTYPE_AUTO_RE = 'decltype\\(auto\\)';

@@ -84,3 +90,3 @@ var NAMESPACE_RE = '[a-zA-Z_]\\w*::';

},
hljs.C_LINE_COMMENT_MODE,
C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE

@@ -124,4 +130,5 @@ ]

var EXPRESSION_CONTAINS = [
PREPROCESSOR,
CPP_PRIMITIVE_TYPES,
hljs.C_LINE_COMMENT_MODE,
C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,

@@ -178,3 +185,3 @@ NUMBERS,

contains: [
hljs.C_LINE_COMMENT_MODE,
C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,

@@ -191,3 +198,3 @@ STRINGS,

'self',
hljs.C_LINE_COMMENT_MODE,
C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,

@@ -202,3 +209,3 @@ STRINGS,

CPP_PRIMITIVE_TYPES,
hljs.C_LINE_COMMENT_MODE,
C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,

@@ -233,5 +240,5 @@ PREPROCESSOR

className: 'class',
beginKeywords: 'class struct', end: /[{;:]/,
beginKeywords: 'enum class struct union', end: /[{;:<>=]/,
contains: [
{begin: /</, end: />/, contains: ['self']}, // skip generic stuff
{ beginKeywords: "final class struct" },
hljs.TITLE_MODE

@@ -238,0 +245,0 @@ ]

/*
Language: C#
Author: Jason Diamond <jason@diamond.name>
Contributor: Nicolas LLOBERA <nllobera@gmail.com>, Pieter Vantorre <pietervantorre@gmail.com>
Contributor: Nicolas LLOBERA <nllobera@gmail.com>, Pieter Vantorre <pietervantorre@gmail.com>, David Pine <david.pine@microsoft.com>
Website: https://docs.microsoft.com/en-us/dotnet/csharp/

@@ -11,16 +11,145 @@ Category: common

function csharp(hljs) {
var BUILT_IN_KEYWORDS = [
'bool',
'byte',
'char',
'decimal',
'delegate',
'double',
'dynamic',
'enum',
'float',
'int',
'long',
'nint',
'nuint',
'object',
'sbyte',
'short',
'string',
'ulong',
'unit',
'ushort'
];
var FUNCTION_MODIFIERS = [
'public',
'private',
'protected',
'static',
'internal',
'protected',
'abstract',
'async',
'extern',
'override',
'unsafe',
'virtual',
'new',
'sealed',
'partial'
];
var LITERAL_KEYWORDS = [
'default',
'false',
'null',
'true'
];
var NORMAL_KEYWORDS = [
'abstract',
'as',
'base',
'break',
'case',
'class',
'const',
'continue',
'do',
'else',
'event',
'explicit',
'extern',
'finally',
'fixed',
'for',
'foreach',
'goto',
'if',
'implicit',
'in',
'interface',
'internal',
'is',
'lock',
'namespace',
'new',
'operator',
'out',
'override',
'params',
'private',
'protected',
'public',
'readonly',
'record',
'ref',
'return',
'sealed',
'sizeof',
'stackalloc',
'static',
'struct',
'switch',
'this',
'throw',
'try',
'typeof',
'unchecked',
'unsafe',
'using',
'virtual',
'void',
'volatile',
'while'
];
var CONTEXTUAL_KEYWORDS = [
'add',
'alias',
'and',
'ascending',
'async',
'await',
'by',
'descending',
'equals',
'from',
'get',
'global',
'group',
'init',
'into',
'join',
'let',
'nameof',
'not',
'notnull',
'on',
'or',
'orderby',
'partial',
'remove',
'select',
'set',
'unmanaged',
'value',
'var',
'when',
'where',
'with',
'yield'
];
var KEYWORDS = {
keyword:
// Normal keywords.
'abstract as base bool break byte case catch char checked const continue decimal ' +
'default delegate do double enum event explicit extern finally fixed float ' +
'for foreach goto if implicit in init int interface internal is lock long ' +
'object operator out override params private protected public readonly ref sbyte ' +
'sealed short sizeof stackalloc static string struct switch this try typeof ' +
'uint ulong unchecked unsafe ushort using virtual void volatile while ' +
// Contextual keywords.
'add alias ascending async await by descending dynamic equals from get global group into join ' +
'let nameof on orderby partial remove select set value var when where yield',
literal:
'null false true'
keyword: NORMAL_KEYWORDS.concat(CONTEXTUAL_KEYWORDS).join(' '),
built_in: BUILT_IN_KEYWORDS.join(' '),
literal: LITERAL_KEYWORDS.join(' ')
};

@@ -95,5 +224,5 @@ var TITLE_MODE = hljs.inherit(hljs.TITLE_MODE, {begin: '[a-zA-Z](\\.?\\w)*'});

end: ">",
contains: [
contains: [
{ beginKeywords: "in out"},
TITLE_MODE
TITLE_MODE
]

@@ -199,2 +328,4 @@ };

contains: [
// prevents these from being highlighted `title`
{ beginKeywords: FUNCTION_MODIFIERS.join(" ")},
{

@@ -201,0 +332,0 @@ begin: hljs.IDENT_RE + '\\s*(\\<.+\\>)?\\s*\\(', returnBegin: true,

@@ -17,4 +17,5 @@ /*

hljs.COMMENT('!', '$', {relevance: 0}),
// allow Fortran 77 style comments
hljs.COMMENT('^C', '$', {relevance: 0})
// allow FORTRAN 77 style comments
hljs.COMMENT('^C[ ]', '$', {relevance: 0}),
hljs.COMMENT('^C$', '$', {relevance: 0})
]

@@ -21,0 +22,0 @@ };

@@ -8,7 +8,12 @@ /*

*/
/** @type LanguageFn */
function fsharp(hljs) {
var TYPEPARAM = {
begin: '<', end: '>',
const TYPEPARAM = {
begin: '<',
end: '>',
contains: [
hljs.inherit(hljs.TITLE_MODE, {begin: /'[a-zA-Z0-9_]+/})
hljs.inherit(hljs.TITLE_MODE, {
begin: /'[a-zA-Z0-9_]+/
})
]

@@ -36,13 +41,21 @@ };

className: 'string',
begin: '@"', end: '"',
contains: [{begin: '""'}]
begin: '@"',
end: '"',
contains: [{
begin: '""'
}]
},
{
className: 'string',
begin: '"""', end: '"""'
begin: '"""',
end: '"""'
},
hljs.COMMENT('\\(\\*', '\\*\\)'),
hljs.COMMENT('\\(\\*(\\s)', '\\*\\)', {
contains: ["self"]
}),
{
className: 'class',
beginKeywords: 'type', end: '\\(|=|$', excludeEnd: true,
beginKeywords: 'type',
end: '\\(|=|$',
excludeEnd: true,
contains: [

@@ -55,3 +68,4 @@ hljs.UNDERSCORE_TITLE_MODE,

className: 'meta',
begin: '\\[<', end: '>\\]',
begin: '\\[<',
end: '>\\]',
relevance: 10

@@ -62,6 +76,8 @@ },

begin: '\\B(\'[A-Za-z])\\b',
contains: [hljs.BACKSLASH_ESCAPE]
contains: [
hljs.BACKSLASH_ESCAPE
]
},
hljs.C_LINE_COMMENT_MODE,
hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}),
hljs.inherit(hljs.QUOTE_STRING_MODE, { illegal: null }),
hljs.C_NUMBER_MODE

@@ -68,0 +84,0 @@ ]

@@ -246,2 +246,8 @@ /**

{
className: 'template-tag',
begin: /\{\{(?=else if)/,
end: /\}\}/,
keywords: 'else if'
},
{
// closing block statement

@@ -248,0 +254,0 @@ className: 'template-tag',

@@ -246,2 +246,8 @@ /**

{
className: 'template-tag',
begin: /\{\{(?=else if)/,
end: /\}\}/,
keywords: 'else if'
},
{
// closing block statement

@@ -248,0 +254,0 @@ className: 'template-tag',

@@ -159,2 +159,30 @@ /**

{
className: 'class',
begin: 'record\\s+' + hljs.UNDERSCORE_IDENT_RE + '\\s*\\(',
returnBegin: true,
excludeEnd: true,
end: /[{;=]/,
keywords: KEYWORDS,
contains: [
{ beginKeywords: "record" },
{
begin: hljs.UNDERSCORE_IDENT_RE + '\\s*\\(',
returnBegin: true,
relevance: 0,
contains: [hljs.UNDERSCORE_TITLE_MODE]
},
{
className: 'params',
begin: /\(/, end: /\)/,
keywords: KEYWORDS,
relevance: 0,
contains: [
hljs.C_BLOCK_COMMENT_MODE
]
},
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE
]
},
{
className: 'function',

@@ -161,0 +189,0 @@ begin: '(' + GENERIC_IDENT_RE + '\\s+)+' + hljs.UNDERSCORE_IDENT_RE + '\\s*\\(', returnBegin: true, end: /[{;=]/,

@@ -164,2 +164,10 @@ const IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*';

/**
* @param {RegExp | string } re
* @returns {string}
*/
function optional(re) {
return concat('(', re, ')?');
}
/**
* @param {...(RegExp | string) } args

@@ -173,20 +181,53 @@ * @returns {string}

/*
Language: JavaScript
Description: JavaScript (JS) is a lightweight, interpreted, or just-in-time compiled programming language with first-class functions.
Category: common, scripting
Website: https://developer.mozilla.org/en-US/docs/Web/JavaScript
*/
/* eslint-disable no-unreachable */
/** @type LanguageFn */
function javascript(hljs) {
var IDENT_RE$1 = IDENT_RE;
var FRAGMENT = {
/**
* Takes a string like "<Booger" and checks to see
* if we can find a matching "</Booger" later in the
* content.
* @param {RegExpMatchArray} match
* @param {{after:number}} param1
*/
const hasClosingTag = (match, { after }) => {
const tag = match[0].replace("<", "</");
const pos = match.input.indexOf(tag, after);
return pos !== -1;
};
const IDENT_RE$1 = IDENT_RE;
const FRAGMENT = {
begin: '<>',
end: '</>'
};
var XML_TAG = {
const XML_TAG = {
begin: /<[A-Za-z0-9\\._:-]+/,
end: /\/[A-Za-z0-9\\._:-]+>|\/>/
end: /\/[A-Za-z0-9\\._:-]+>|\/>/,
/**
* @param {RegExpMatchArray} match
* @param {CallbackResponse} response
*/
isTrulyOpeningTag: (match, response) => {
const afterMatchIndex = match[0].length + match.index;
const nextChar = match.input[afterMatchIndex];
// nested type?
// HTML should not include another raw `<` inside a tag
// But a type might: `<Array<Array<number>>`, etc.
if (nextChar === "<") {
response.ignoreMatch();
return;
}
// <something>
// This is now either a tag or a type.
if (nextChar === ">") {
// if we cannot find a matching closing tag, then we
// will ignore it
if (!hasClosingTag(match, { after: afterMatchIndex })) {
response.ignoreMatch();
}
}
}
};
var KEYWORDS$1 = {
const KEYWORDS$1 = {
$pattern: IDENT_RE,

@@ -197,21 +238,38 @@ keyword: KEYWORDS.join(" "),

};
var NUMBER = {
const nonDecimalLiterals = (prefixLetters, validChars) =>
`\\b0[${prefixLetters}][${validChars}]([${validChars}_]*[${validChars}])?n?`;
const noLeadingZeroDecimalDigits = /[1-9]([0-9_]*\d)?/;
const decimalDigits = /\d([0-9_]*\d)?/;
const exponentPart = concat(/[eE][+-]?/, decimalDigits);
const NUMBER = {
className: 'number',
variants: [
{ begin: '\\b(0[bB][01]+)n?' },
{ begin: '\\b(0[oO][0-7]+)n?' },
{ begin: hljs.C_NUMBER_RE + 'n?' }
{ begin: nonDecimalLiterals('bB', '01') }, // Binary literals
{ begin: nonDecimalLiterals('oO', '0-7') }, // Octal literals
{ begin: nonDecimalLiterals('xX', '0-9a-fA-F') }, // Hexadecimal literals
{ begin: concat(/\b/, noLeadingZeroDecimalDigits, 'n') }, // Non-zero BigInt literals
{ begin: concat(/(\b0)?\./, decimalDigits, optional(exponentPart)) }, // Decimal literals between 0 and 1
{ begin: concat(
/\b/,
noLeadingZeroDecimalDigits,
optional(concat(/\./, optional(decimalDigits))), // fractional part
optional(exponentPart)
) }, // Decimal literals >= 1
{ begin: /\b0[\.n]?/ }, // Zero literals (`0`, `0.`, `0n`)
],
relevance: 0
};
var SUBST = {
const SUBST = {
className: 'subst',
begin: '\\$\\{', end: '\\}',
begin: '\\$\\{',
end: '\\}',
keywords: KEYWORDS$1,
contains: [] // defined later
contains: [] // defined later
};
var HTML_TEMPLATE = {
begin: 'html`', end: '',
const HTML_TEMPLATE = {
begin: 'html`',
end: '',
starts: {
end: '`', returnEnd: false,
end: '`',
returnEnd: false,
contains: [

@@ -221,9 +279,11 @@ hljs.BACKSLASH_ESCAPE,

],
subLanguage: 'xml',
subLanguage: 'xml'
}
};
var CSS_TEMPLATE = {
begin: 'css`', end: '',
const CSS_TEMPLATE = {
begin: 'css`',
end: '',
starts: {
end: '`', returnEnd: false,
end: '`',
returnEnd: false,
contains: [

@@ -233,8 +293,9 @@ hljs.BACKSLASH_ESCAPE,

],
subLanguage: 'css',
subLanguage: 'css'
}
};
var TEMPLATE_STRING = {
const TEMPLATE_STRING = {
className: 'string',
begin: '`', end: '`',
begin: '`',
end: '`',
contains: [

@@ -245,3 +306,44 @@ hljs.BACKSLASH_ESCAPE,

};
SUBST.contains = [
const JSDOC_COMMENT = hljs.COMMENT(
'/\\*\\*',
'\\*/',
{
relevance: 0,
contains: [
{
className: 'doctag',
begin: '@[A-Za-z]+',
contains: [
{
className: 'type',
begin: '\\{',
end: '\\}',
relevance: 0
},
{
className: 'variable',
begin: IDENT_RE$1 + '(?=\\s*(-)|$)',
endsParent: true,
relevance: 0
},
// eat spaces (not newlines) so we can find
// types or variables
{
begin: /(?=[^\n])\s/,
relevance: 0
}
]
}
]
}
);
const COMMENT = {
className: "comment",
variants: [
JSDOC_COMMENT,
hljs.C_BLOCK_COMMENT_MODE,
hljs.C_LINE_COMMENT_MODE
]
};
const SUBST_INTERNALS = [
hljs.APOS_STRING_MODE,

@@ -255,15 +357,30 @@ hljs.QUOTE_STRING_MODE,

];
var PARAMS_CONTAINS = SUBST.contains.concat([
SUBST.contains = SUBST_INTERNALS
.concat({
// we need to pair up {} inside our subst to prevent
// it from ending too early by matching another }
begin: /{/,
end: /}/,
keywords: KEYWORDS$1,
contains: [
"self"
].concat(SUBST_INTERNALS)
});
const SUBST_AND_COMMENTS = [].concat(COMMENT, SUBST.contains);
const PARAMS_CONTAINS = SUBST_AND_COMMENTS.concat([
// eat recursive parens in sub expressions
{ begin: /\(/, end: /\)/,
contains: ["self"].concat(SUBST.contains, [hljs.C_BLOCK_COMMENT_MODE, hljs.C_LINE_COMMENT_MODE])
},
hljs.C_BLOCK_COMMENT_MODE,
hljs.C_LINE_COMMENT_MODE
{
begin: /\(/,
end: /\)/,
keywords: KEYWORDS$1,
contains: ["self"].concat(SUBST_AND_COMMENTS)
}
]);
var PARAMS = {
const PARAMS = {
className: 'params',
begin: /\(/, end: /\)/,
begin: /\(/,
end: /\)/,
excludeBegin: true,
excludeEnd: true,
keywords: KEYWORDS$1,
contains: PARAMS_CONTAINS

@@ -273,7 +390,11 @@ };

return {
name: 'JavaScript',
name: 'Javascript',
aliases: ['js', 'jsx', 'mjs', 'cjs'],
keywords: KEYWORDS$1,
// this will be extended by TypeScript
exports: { PARAMS_CONTAINS },
illegal: /#(?![$_A-z])/,
contains: [
hljs.SHEBANG({
label: "shebang",
binary: "node",

@@ -283,2 +404,3 @@ relevance: 5

{
label: "use_strict",
className: 'meta',

@@ -293,37 +415,3 @@ relevance: 10,

TEMPLATE_STRING,
hljs.C_LINE_COMMENT_MODE,
hljs.COMMENT(
'/\\*\\*',
'\\*/',
{
relevance : 0,
contains : [
{
className : 'doctag',
begin : '@[A-Za-z]+',
contains : [
{
className: 'type',
begin: '\\{',
end: '\\}',
relevance: 0
},
{
className: 'variable',
begin: IDENT_RE$1 + '(?=\\s*(-)|$)',
endsParent: true,
relevance: 0
},
// eat spaces (not newlines) so we can find
// types or variables
{
begin: /(?=[^\n])\s/,
relevance: 0
},
]
}
]
}
),
hljs.C_BLOCK_COMMENT_MODE,
COMMENT,
NUMBER,

@@ -345,3 +433,5 @@ { // object attr container

// the first key:value pairing
/(((\/\/.*$)|(\/\*(.|\n)*\*\/))\s*)*/,
/(\/\/.*$)*/,
/(\/\*(.|\n)*\*\/)*/,
/\s*/,
IDENT_RE$1 + '\\s*:'))),

@@ -353,4 +443,4 @@ relevance: 0,

begin: IDENT_RE$1 + lookahead('\\s*:'),
relevance: 0,
},
relevance: 0
}
]

@@ -362,4 +452,3 @@ },

contains: [
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
COMMENT,
hljs.REGEXP_MODE,

@@ -371,8 +460,10 @@ {

// sub-expressions inside also surrounded by parens.
begin: '(\\([^(]*' +
'(\\([^(]*' +
'(\\([^(]*' +
'\\))?' +
'\\))?' +
'\\)|' + hljs.UNDERSCORE_IDENT_RE + ')\\s*=>', returnBegin: true,
begin: '(\\(' +
'[^()]*(\\(' +
'[^()]*(\\(' +
'[^()]*' +
'\\))*[^()]*' +
'\\))*[^()]*' +
'\\)|' + hljs.UNDERSCORE_IDENT_RE + ')\\s*=>',
returnBegin: true,
end: '\\s*=>',

@@ -392,4 +483,6 @@ contains: [

{
begin: /\(/, end: /\)/,
excludeBegin: true, excludeEnd: true,
begin: /\(/,
end: /\)/,
excludeBegin: true,
excludeEnd: true,
keywords: KEYWORDS$1,

@@ -403,3 +496,3 @@ contains: PARAMS_CONTAINS

{ // could be a comma delimited list of params to a function call
begin: /,/, relevance: 0,
begin: /,/, relevance: 0
},

@@ -410,3 +503,3 @@ {

end: /\s*/,
skip: true,
skip: true
},

@@ -416,3 +509,9 @@ { // JSX

{ begin: FRAGMENT.begin, end: FRAGMENT.end },
{ begin: XML_TAG.begin, end: XML_TAG.end }
{
begin: XML_TAG.begin,
// we carefully check the opening tag to see if it truly
// is a tag and not a false positive
'on:begin': XML_TAG.isTrulyOpeningTag,
end: XML_TAG.end
}
],

@@ -422,7 +521,9 @@ subLanguage: 'xml',

{
begin: XML_TAG.begin, end: XML_TAG.end, skip: true,
begin: XML_TAG.begin,
end: XML_TAG.end,
skip: true,
contains: ['self']
}
]
},
}
],

@@ -433,20 +534,50 @@ relevance: 0

className: 'function',
beginKeywords: 'function', end: /\{/, excludeEnd: true,
beginKeywords: 'function',
end: /[{;]/,
excludeEnd: true,
keywords: KEYWORDS$1,
contains: [
hljs.inherit(hljs.TITLE_MODE, {begin: IDENT_RE$1}),
'self',
hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1 }),
PARAMS
],
illegal: /\[|%/
illegal: /%/
},
{
begin: /\$[(.]/ // relevance booster for a pattern common to JS libs: `$(something)` and `$.something`
className: 'function',
// we have to count the parens to make sure we actually have the correct
// bounding ( ). There could be any number of sub-expressions inside
// also surrounded by parens.
begin: hljs.UNDERSCORE_IDENT_RE +
'\\(' + // first parens
'[^()]*(\\(' +
'[^()]*(\\(' +
'[^()]*' +
'\\))*[^()]*' +
'\\))*[^()]*' +
'\\)\\s*{', // end parens
returnBegin:true,
contains: [
PARAMS,
hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1 }),
]
},
hljs.METHOD_GUARD,
// hack: prevents detection of keywords in some circumstances
// .keyword()
// $keyword = x
{
variants: [
{ begin: '\\.' + IDENT_RE$1 },
{ begin: '\\$' + IDENT_RE$1 }
],
relevance: 0
},
{ // ES6 class
className: 'class',
beginKeywords: 'class', end: /[{;=]/, excludeEnd: true,
beginKeywords: 'class',
end: /[{;=]/,
excludeEnd: true,
illegal: /[:"\[\]]/,
contains: [
{beginKeywords: 'extends'},
{ beginKeywords: 'extends' },
hljs.UNDERSCORE_TITLE_MODE

@@ -456,3 +587,10 @@ ]

{
beginKeywords: 'constructor', end: /\{/, excludeEnd: true
begin: /\b(?=constructor)/,
end: /[\{;]/,
excludeEnd: true,
contains: [
hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1 }),
'self',
PARAMS
]
},

@@ -464,10 +602,11 @@ {

contains: [
hljs.inherit(hljs.TITLE_MODE, {begin: IDENT_RE$1}),
hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1 }),
{ begin: /\(\)/ }, // eat to avoid empty params
PARAMS
]
},
{
begin: /\$[(.]/ // relevance booster for a pattern common to JS libs: `$(something)` and `$.something`
}
],
illegal: /#(?!!)/
]
};

@@ -474,0 +613,0 @@ }

@@ -0,4 +1,32 @@

/**
* @param {string} value
* @returns {RegExp}
* */
/**
* @param {RegExp | string } re
* @returns {string}
*/
function source(re) {
if (!re) return null;
if (typeof re === "string") return re;
return re.source;
}
/**
* Any of the passed expresssions may match
*
* Creates a huge this | this | that | that match
* @param {(RegExp | string)[] } args
* @returns {string}
*/
function either(...args) {
const joined = '(' + args.map((x) => source(x)).join("|") + ")";
return joined;
}
/*
Language: LaTeX
Author: Vladimir Moskva <vladmos@gmail.com>
Author: Benedikt Wilde <bwilde@posteo.de>
Website: https://www.latex-project.org

@@ -8,5 +36,62 @@ Category: markup

/** @type LanguageFn */
function latex(hljs) {
var COMMAND = {
className: 'tag',
const KNOWN_CONTROL_WORDS = either(...[
'(?:NeedsTeXFormat|RequirePackage|GetIdInfo)',
'Provides(?:Expl)?(?:Package|Class|File)',
'(?:DeclareOption|ProcessOptions)',
'(?:documentclass|usepackage|input|include)',
'makeat(?:letter|other)',
'ExplSyntax(?:On|Off)',
'(?:new|renew|provide)?command',
'(?:re)newenvironment',
'(?:New|Renew|Provide|Declare)(?:Expandable)?DocumentCommand',
'(?:New|Renew|Provide|Declare)DocumentEnvironment',
'(?:(?:e|g|x)?def|let)',
'(?:begin|end)',
'(?:part|chapter|(?:sub){0,2}section|(?:sub)?paragraph)',
'caption',
'(?:label|(?:eq|page|name)?ref|(?:paren|foot|super)?cite)',
'(?:alpha|beta|[Gg]amma|[Dd]elta|(?:var)?epsilon|zeta|eta|[Tt]heta|vartheta)',
'(?:iota|(?:var)?kappa|[Ll]ambda|mu|nu|[Xx]i|[Pp]i|varpi|(?:var)rho)',
'(?:[Ss]igma|varsigma|tau|[Uu]psilon|[Pp]hi|varphi|chi|[Pp]si|[Oo]mega)',
'(?:frac|sum|prod|lim|infty|times|sqrt|leq|geq|left|right|middle|[bB]igg?)',
'(?:[lr]angle|q?quad|[lcvdi]?dots|d?dot|hat|tilde|bar)'
].map(word => word + '(?![a-zA-Z@:_])'));
const L3_REGEX = new RegExp([
// A function \module_function_name:signature or \__module_function_name:signature,
// where both module and function_name need at least two characters and
// function_name may contain single underscores.
'(?:__)?[a-zA-Z]{2,}_[a-zA-Z](?:_?[a-zA-Z])+:[a-zA-Z]*',
// A variable \scope_module_and_name_type or \scope__module_ane_name_type,
// where scope is one of l, g or c, type needs at least two characters
// and module_and_name may contain single underscores.
'[lgc]__?[a-zA-Z](?:_?[a-zA-Z])*_[a-zA-Z]{2,}',
// A quark \q_the_name or \q__the_name or
// scan mark \s_the_name or \s__vthe_name,
// where variable_name needs at least two characters and
// may contain single underscores.
'[qs]__?[a-zA-Z](?:_?[a-zA-Z])+',
// Other LaTeX3 macro names that are not covered by the three rules above.
'use(?:_i)?:[a-zA-Z]*',
'(?:else|fi|or):',
'(?:if|cs|exp):w',
'(?:hbox|vbox):n',
'::[a-zA-Z]_unbraced',
'::[a-zA-Z:]'
].map(pattern => pattern + '(?![a-zA-Z:_])').join('|'));
const L2_VARIANTS = [
{begin: /[a-zA-Z@]+/}, // control word
{begin: /[^a-zA-Z@]?/} // control symbol
];
const DOUBLE_CARET_VARIANTS = [
{begin: /\^{6}[0-9a-f]{6}/},
{begin: /\^{5}[0-9a-f]{5}/},
{begin: /\^{4}[0-9a-f]{4}/},
{begin: /\^{3}[0-9a-f]{3}/},
{begin: /\^{2}[0-9a-f]{2}/},
{begin: /\^{2}[\u0000-\u007f]/}
];
const CONTROL_SEQUENCE = {
className: 'keyword',
begin: /\\/,

@@ -16,55 +101,174 @@ relevance: 0,

{
className: 'name',
variants: [
{begin: /[a-zA-Z\u0430-\u044f\u0410-\u042f]+[*]?/},
{begin: /[^a-zA-Z\u0430-\u044f\u0410-\u042f0-9]/}
],
starts: {
endsWithParent: true,
relevance: 0,
contains: [
{
className: 'string', // because it looks like attributes in HTML tags
variants: [
{begin: /\[/, end: /\]/},
{begin: /\{/, end: /\}/}
]
},
{
begin: /\s*=\s*/, endsWithParent: true,
relevance: 0,
contains: [
{
className: 'number',
begin: /-?\d*\.?\d+(pt|pc|mm|cm|in|dd|cc|ex|em)?/
}
]
}
]
}
endsParent: true,
begin: KNOWN_CONTROL_WORDS
},
{
endsParent: true,
begin: L3_REGEX
},
{
endsParent: true,
variants: DOUBLE_CARET_VARIANTS
},
{
endsParent: true,
relevance: 0,
variants: L2_VARIANTS
}
]
};
const MACRO_PARAM = {
className: 'params',
relevance: 0,
begin: /#+\d?/
};
const DOUBLE_CARET_CHAR = {
// relevance: 1
variants: DOUBLE_CARET_VARIANTS
};
const SPECIAL_CATCODE = {
className: 'built_in',
relevance: 0,
begin: /[$&^_]/
};
const MAGIC_COMMENT = {
className: 'meta',
begin: '% !TeX',
end: '$',
relevance: 10
};
const COMMENT = hljs.COMMENT(
'%',
'$',
{
relevance: 0
}
);
const EVERYTHING_BUT_VERBATIM = [
CONTROL_SEQUENCE,
MACRO_PARAM,
DOUBLE_CARET_CHAR,
SPECIAL_CATCODE,
MAGIC_COMMENT,
COMMENT
];
const BRACE_GROUP_NO_VERBATIM = {
begin: /\{/, end: /\}/,
relevance: 0,
contains: ['self', ...EVERYTHING_BUT_VERBATIM]
};
const ARGUMENT_BRACES = hljs.inherit(
BRACE_GROUP_NO_VERBATIM,
{
relevance: 0,
endsParent: true,
contains: [BRACE_GROUP_NO_VERBATIM, ...EVERYTHING_BUT_VERBATIM]
}
);
const ARGUMENT_BRACKETS = {
begin: /\[/,
end: /\]/,
endsParent: true,
relevance: 0,
contains: [BRACE_GROUP_NO_VERBATIM, ...EVERYTHING_BUT_VERBATIM]
};
const SPACE_GOBBLER = {
begin: /\s+/,
relevance: 0
};
const ARGUMENT_M = [ARGUMENT_BRACES];
const ARGUMENT_O = [ARGUMENT_BRACKETS];
const ARGUMENT_AND_THEN = function(arg, starts_mode) {
return {
contains: [SPACE_GOBBLER],
starts: {
relevance: 0,
contains: arg,
starts: starts_mode
}
};
};
const CSNAME = function(csname, starts_mode) {
return {
begin: '\\\\' + csname + '(?![a-zA-Z@:_])',
keywords: {$pattern: /\\[a-zA-Z]+/, keyword: '\\' + csname},
relevance: 0,
contains: [SPACE_GOBBLER],
starts: starts_mode
};
};
const BEGIN_ENV = function(envname, starts_mode) {
return hljs.inherit(
{
begin: '\\\\begin(?=\\s*\\r?\\n?\\s*\\{' + envname + '\\})',
keywords: {$pattern: /\\[a-zA-Z]+/, keyword: '\\begin'},
relevance: 0,
},
ARGUMENT_AND_THEN(ARGUMENT_M, starts_mode)
);
};
const VERBATIM_DELIMITED_EQUAL = (innerName = "string") => {
return hljs.END_SAME_AS_BEGIN({
className: innerName,
begin: /(.|\r?\n)/,
end: /(.|\r?\n)/,
excludeBegin: true,
excludeEnd: true,
endsParent: true
});
};
const VERBATIM_DELIMITED_ENV = function(envname) {
return {
className: 'string',
end: '(?=\\\\end\\{' + envname + '\\})'
};
};
const VERBATIM_DELIMITED_BRACES = (innerName = "string") => {
return {
relevance: 0,
begin: /\{/,
starts: {
endsParent: true,
contains: [
{
className: innerName,
end: /(?=\})/,
endsParent:true,
contains: [
{
begin: /\{/,
end: /\}/,
relevance: 0,
contains: ["self"]
}
],
}
]
}
};
};
const VERBATIM = [
...['verb', 'lstinline'].map(csname => CSNAME(csname, {contains: [VERBATIM_DELIMITED_EQUAL()]})),
CSNAME('mint', ARGUMENT_AND_THEN(ARGUMENT_M, {contains: [VERBATIM_DELIMITED_EQUAL()]})),
CSNAME('mintinline', ARGUMENT_AND_THEN(ARGUMENT_M, {contains: [VERBATIM_DELIMITED_BRACES(), VERBATIM_DELIMITED_EQUAL()]})),
CSNAME('url', {contains: [VERBATIM_DELIMITED_BRACES("link"), VERBATIM_DELIMITED_BRACES("link")]}),
CSNAME('hyperref', {contains: [VERBATIM_DELIMITED_BRACES("link")]}),
CSNAME('href', ARGUMENT_AND_THEN(ARGUMENT_O, {contains: [VERBATIM_DELIMITED_BRACES("link")]})),
...[].concat(...['', '\\*'].map(suffix => [
BEGIN_ENV('verbatim' + suffix, VERBATIM_DELIMITED_ENV('verbatim' + suffix)),
BEGIN_ENV('filecontents' + suffix, ARGUMENT_AND_THEN(ARGUMENT_M, VERBATIM_DELIMITED_ENV('filecontents' + suffix))),
...['', 'B', 'L'].map(prefix =>
BEGIN_ENV(prefix + 'Verbatim' + suffix, ARGUMENT_AND_THEN(ARGUMENT_O, VERBATIM_DELIMITED_ENV(prefix + 'Verbatim' + suffix)))
)
])),
BEGIN_ENV('minted', ARGUMENT_AND_THEN(ARGUMENT_O, ARGUMENT_AND_THEN(ARGUMENT_M, VERBATIM_DELIMITED_ENV('minted')))),
];
return {
name: 'LaTeX',
aliases: ['tex'],
aliases: ['TeX'],
contains: [
COMMAND,
{
className: 'formula',
contains: [COMMAND],
relevance: 0,
variants: [
{begin: /\$\$/, end: /\$\$/},
{begin: /\$/, end: /\$/}
]
},
hljs.COMMENT(
'%',
'$',
{
relevance: 0
}
)
...VERBATIM,
...EVERYTHING_BUT_VERBATIM
]

@@ -71,0 +275,0 @@ };

@@ -51,3 +51,3 @@ /*

name: 'Objective-C',
aliases: ['mm', 'objc', 'obj-c'],
aliases: ['mm', 'objc', 'obj-c', 'obj-c++', 'objective-c++'],
keywords: OBJC_KEYWORDS,

@@ -54,0 +54,0 @@ illegal: '</',

@@ -73,3 +73,3 @@ /*

// <https://www.php.net/manual/en/language.types.type-juggling.php>
'array abstract and as binary bool boolean break callable case catch class clone const continue declare default do double else elseif empty enddeclare endfor endforeach endif endswitch endwhile eval extends final finally float for foreach from global goto if implements instanceof insteadof int integer interface isset iterable list new object or private protected public real return string switch throw trait try unset use var void while xor yield',
'array abstract and as binary bool boolean break callable case catch class clone const continue declare default do double else elseif empty enddeclare endfor endforeach endif endswitch endwhile eval extends final finally float for foreach from global goto if implements instanceof insteadof int integer interface isset iterable list match new object or private protected public real return string switch throw trait try unset use var void while xor yield',
literal: 'false null true',

@@ -89,3 +89,3 @@ built_in:

return {
aliases: ['php', 'php3', 'php4', 'php5', 'php6', 'php7'],
aliases: ['php', 'php3', 'php4', 'php5', 'php6', 'php7', 'php8'],
case_insensitive: true,

@@ -92,0 +92,0 @@ keywords: KEYWORDS,

@@ -9,15 +9,130 @@ /*

function python(hljs) {
var KEYWORDS = {
keyword:
'and elif is global as in if from raise for except finally print import pass return ' +
'exec else break not with class assert yield try while continue del or def lambda ' +
'async await nonlocal|10',
built_in:
'Ellipsis NotImplemented',
literal: 'False None True'
const RESERVED_WORDS = [
'and',
'as',
'assert',
'async',
'await',
'break',
'class',
'continue',
'def',
'del',
'elif',
'else',
'except',
'finally',
'for',
'',
'from',
'global',
'if',
'import',
'in',
'is',
'lambda',
'nonlocal|10',
'not',
'or',
'pass',
'raise',
'return',
'try',
'while',
'with',
'yield',
];
const BUILT_INS = [
'__import__',
'abs',
'all',
'any',
'ascii',
'bin',
'bool',
'breakpoint',
'bytearray',
'bytes',
'callable',
'chr',
'classmethod',
'compile',
'complex',
'delattr',
'dict',
'dir',
'divmod',
'enumerate',
'eval',
'exec',
'filter',
'float',
'format',
'frozenset',
'getattr',
'globals',
'hasattr',
'hash',
'help',
'hex',
'id',
'input',
'int',
'isinstance',
'issubclass',
'iter',
'len',
'list',
'locals',
'map',
'max',
'memoryview',
'min',
'next',
'object',
'oct',
'open',
'ord',
'pow',
'print',
'property',
'range',
'repr',
'reversed',
'round',
'set',
'setattr',
'slice',
'sorted',
'staticmethod',
'str',
'sum',
'super',
'tuple',
'type',
'vars',
'zip',
];
const LITERALS = [
'__debug__',
'Ellipsis',
'False',
'None',
'NotImplemented',
'True',
];
const KEYWORDS = {
keyword: RESERVED_WORDS.join(' '),
built_in: BUILT_INS.join(' '),
literal: LITERALS.join(' ')
};
var PROMPT = {
const PROMPT = {
className: 'meta', begin: /^(>>>|\.\.\.) /
};
var SUBST = {
const SUBST = {
className: 'subst',

@@ -28,7 +143,9 @@ begin: /\{/, end: /\}/,

};
var LITERAL_BRACKET = {
const LITERAL_BRACKET = {
begin: /\{\{/,
relevance: 0
};
var STRING = {
const STRING = {
className: 'string',

@@ -38,3 +155,3 @@ contains: [hljs.BACKSLASH_ESCAPE],

{
begin: /(u|b)?r?'''/, end: /'''/,
begin: /([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/, end: /'''/,
contains: [hljs.BACKSLASH_ESCAPE, PROMPT],

@@ -44,3 +161,3 @@ relevance: 10

{
begin: /(u|b)?r?"""/, end: /"""/,
begin: /([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/, end: /"""/,
contains: [hljs.BACKSLASH_ESCAPE, PROMPT],

@@ -50,29 +167,29 @@ relevance: 10

{
begin: /(fr|rf|f)'''/, end: /'''/,
begin: /([fF][rR]|[rR][fF]|[fF])'''/, end: /'''/,
contains: [hljs.BACKSLASH_ESCAPE, PROMPT, LITERAL_BRACKET, SUBST]
},
{
begin: /(fr|rf|f)"""/, end: /"""/,
begin: /([fF][rR]|[rR][fF]|[fF])"""/, end: /"""/,
contains: [hljs.BACKSLASH_ESCAPE, PROMPT, LITERAL_BRACKET, SUBST]
},
{
begin: /(u|r|ur)'/, end: /'/,
begin: /([uU]|[rR])'/, end: /'/,
relevance: 10
},
{
begin: /(u|r|ur)"/, end: /"/,
begin: /([uU]|[rR])"/, end: /"/,
relevance: 10
},
{
begin: /(b|br)'/, end: /'/
begin: /([bB]|[bB][rR]|[rR][bB])'/, end: /'/
},
{
begin: /(b|br)"/, end: /"/
begin: /([bB]|[bB][rR]|[rR][bB])"/, end: /"/
},
{
begin: /(fr|rf|f)'/, end: /'/,
begin: /([fF][rR]|[rR][fF]|[fF])'/, end: /'/,
contains: [hljs.BACKSLASH_ESCAPE, LITERAL_BRACKET, SUBST]
},
{
begin: /(fr|rf|f)"/, end: /"/,
begin: /([fF][rR]|[rR][fF]|[fF])"/, end: /"/,
contains: [hljs.BACKSLASH_ESCAPE, LITERAL_BRACKET, SUBST]

@@ -84,3 +201,4 @@ },

};
var NUMBER = {
const NUMBER = {
className: 'number', relevance: 0,

@@ -93,3 +211,4 @@ variants: [

};
var PARAMS = {
const PARAMS = {
className: 'params',

@@ -101,2 +220,3 @@ variants: [

begin: /\(/, end: /\)/, excludeBegin: true, excludeEnd: true,
keywords: KEYWORDS,
contains: ['self', PROMPT, NUMBER, STRING, hljs.HASH_COMMENT_MODE],

@@ -107,2 +227,3 @@ },

SUBST.contains = [STRING, NUMBER, PROMPT];
return {

@@ -109,0 +230,0 @@ name: 'Python',

@@ -5,2 +5,3 @@ /*

Author: Joe Cheng <joe@rstudio.org>
Contributors: Konrad Rudolph <konrad.rudolph@gmail.com>
Website: https://www.r-project.org

@@ -11,52 +12,137 @@ Category: scientific

function r(hljs) {
var IDENT_RE = '([a-zA-Z]|\\.[a-zA-Z.])[a-zA-Z0-9._]*';
// Identifiers in R cannot start with `_`, but they can start with `.` if it
// is not immediately followed by a digit.
// R also supports quoted identifiers, which are near-arbitrary sequences
// delimited by backticks (`…`), which may contain escape sequences. These are
// handled in a separate mode. See `test/markup/r/names.txt` for examples.
// FIXME: Support Unicode identifiers.
const IDENT_RE = /(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/;
return {
name: 'R',
keywords: {
$pattern: IDENT_RE,
keyword:
'function if in break next repeat else for while',
literal:
'NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 ' +
'NA_character_|10 NA_complex_|10',
built_in:
// Builtin constants
'LETTERS letters month.abb month.name pi T F ' +
// Primitive functions
// These are all the functions in `base` that are implemented as a
// `.Primitive`, minus those functions that are also keywords.
'abs acos acosh all any anyNA Arg as.call as.character' +
'as.complex as.double as.environment as.integer as.logical' +
'as.null.default as.numeric as.raw asin asinh atan atanh attr' +
'attributes baseenv browser c call ceiling class Conj cos cosh' +
'cospi cummax cummin cumprod cumsum digamma dim dimnames' +
'emptyenv exp expression floor forceAndCall gamma gc.time' +
'globalenv Im interactive invisible is.array is.atomic is.call' +
'is.character is.complex is.double is.environment is.expression' +
'is.finite is.function is.infinite is.integer is.language' +
'is.list is.logical is.matrix is.na is.name is.nan is.null' +
'is.numeric is.object is.pairlist is.raw is.recursive is.single' +
'is.symbol lazyLoadDBfetch length lgamma list log max min' +
'missing Mod names nargs nzchar oldClass on.exit pos.to.env' +
'proc.time prod quote range Re rep retracemem return round' +
'seq_along seq_len seq.int sign signif sin sinh sinpi sqrt' +
'standardGeneric substitute sum switch tan tanh tanpi tracemem' +
'trigamma trunc unclass untracemem UseMethod xtfrm',
},
contains: [
// Roxygen comments
hljs.COMMENT(
/#'/,
/$/,
{
contains: [
{
// Handle `@examples` separately to cause all subsequent code
// until the next `@`-tag on its own line to be kept as-is,
// preventing highlighting. This code is example R code, so nested
// doctags shouldn’t be treated as such. See
// `test/markup/r/roxygen.txt` for an example.
className: 'doctag',
begin: '@examples',
starts: {
contains: [
{ begin: /\n/ },
{
begin: /#'\s*(?=@[a-zA-Z]+)/,
endsParent: true,
},
{
begin: /#'/,
end: /$/,
excludeBegin: true,
}
]
}
},
{
// Handle `@param` to highlight the parameter name following
// after.
className: 'doctag',
begin: '@param',
end: /$/,
contains: [
{
className: 'variable',
variants: [
{ begin: IDENT_RE },
{ begin: /`(?:\\.|[^`])+`/ }
],
endsParent: true
}
]
},
{
className: 'doctag',
begin: /@[a-zA-Z]+/
},
{
className: 'meta-keyword',
begin: /\\[a-zA-Z]+/,
}
]
}
),
hljs.HASH_COMMENT_MODE,
{
begin: IDENT_RE,
keywords: {
$pattern: IDENT_RE,
keyword:
'function if in break next repeat else for return switch while try tryCatch ' +
'stop warning require library attach detach source setMethod setGeneric ' +
'setGroupGeneric setClass ...',
literal:
'NULL NA TRUE FALSE T F Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 ' +
'NA_complex_|10'
},
relevance: 0
className: 'string',
contains: [hljs.BACKSLASH_ESCAPE],
variants: [
hljs.END_SAME_AS_BEGIN({ begin: /[rR]"(-*)\(/, end: /\)(-*)"/ }),
hljs.END_SAME_AS_BEGIN({ begin: /[rR]"(-*)\{/, end: /\}(-*)"/ }),
hljs.END_SAME_AS_BEGIN({ begin: /[rR]"(-*)\[/, end: /\](-*)"/ }),
hljs.END_SAME_AS_BEGIN({ begin: /[rR]'(-*)\(/, end: /\)(-*)'/ }),
hljs.END_SAME_AS_BEGIN({ begin: /[rR]'(-*)\{/, end: /\}(-*)'/ }),
hljs.END_SAME_AS_BEGIN({ begin: /[rR]'(-*)\[/, end: /\](-*)'/ }),
{begin: '"', end: '"', relevance: 0},
{begin: "'", end: "'", relevance: 0}
],
},
{
// hex value
className: 'number',
begin: "0[xX][0-9a-fA-F]+[Li]?\\b",
variants: [
// Special case: only hexadecimal binary powers can contain fractions.
{ begin: /(?<![a-zA-Z0-9._])0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/ },
{ begin: /(?<![a-zA-Z0-9._])0[xX][0-9a-fA-F]+([pP][+-]?\d+)?[Li]?/ },
{ begin: /(?<![a-zA-Z0-9._])(\d+(\.\d*)?|\.\d+)([eE][+-]?\d+)?[Li]?/ }
],
relevance: 0
},
{
// explicit integer
className: 'number',
begin: "\\d+(?:[eE][+\\-]?\\d*)?L\\b",
relevance: 0
// infix operator
begin: '%',
end: '%'
},
{
// number with trailing decimal
className: 'number',
begin: "\\d+\\.(?!\\d)(?:i\\b)?",
relevance: 0
},
{
// number
className: 'number',
begin: "\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b",
relevance: 0
},
{
// number with leading decimal
className: 'number',
begin: "\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b",
relevance: 0
},

@@ -67,11 +153,4 @@ {

end: '`',
relevance: 0
},
{
className: 'string',
contains: [hljs.BACKSLASH_ESCAPE],
variants: [
{begin: '"', end: '"'},
{begin: "'", end: "'"}
contains: [
{ begin: /\\./ }
]

@@ -78,0 +157,0 @@ }

@@ -72,2 +72,4 @@ /*

contains: [
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
{

@@ -74,0 +76,0 @@ beginKeywords: 'extends with',

@@ -139,65 +139,135 @@ const IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*';

/*
Language: TypeScript
Author: Panu Horsmalahti <panu.horsmalahti@iki.fi>
Contributors: Ike Ku <dempfi@yahoo.com>
Description: TypeScript is a strict superset of JavaScript
Website: https://www.typescriptlang.org
Category: common, scripting
*/
/**
* @param {string} value
* @returns {RegExp}
* */
function typescript(hljs) {
var IDENT_RE$1 = IDENT_RE;
var TYPES = [
"any",
"void",
"number",
"boolean",
"string",
"object",
"never",
"enum"
];
var TS_SPECIFIC_KEYWORDS = [
"type",
"namespace",
"typedef",
"interface",
"public",
"private",
"protected",
"implements",
"declare",
"abstract",
"readonly"
];
var KEYWORDS$1 = {
/**
* @param {RegExp | string } re
* @returns {string}
*/
function source(re) {
if (!re) return null;
if (typeof re === "string") return re;
return re.source;
}
/**
* @param {RegExp | string } re
* @returns {string}
*/
function lookahead(re) {
return concat('(?=', re, ')');
}
/**
* @param {RegExp | string } re
* @returns {string}
*/
function optional(re) {
return concat('(', re, ')?');
}
/**
* @param {...(RegExp | string) } args
* @returns {string}
*/
function concat(...args) {
const joined = args.map((x) => source(x)).join("");
return joined;
}
/* eslint-disable no-unreachable */
/** @type LanguageFn */
function javascript(hljs) {
/**
* Takes a string like "<Booger" and checks to see
* if we can find a matching "</Booger" later in the
* content.
* @param {RegExpMatchArray} match
* @param {{after:number}} param1
*/
const hasClosingTag = (match, { after }) => {
const tag = match[0].replace("<", "</");
const pos = match.input.indexOf(tag, after);
return pos !== -1;
};
const IDENT_RE$1 = IDENT_RE;
const FRAGMENT = {
begin: '<>',
end: '</>'
};
const XML_TAG = {
begin: /<[A-Za-z0-9\\._:-]+/,
end: /\/[A-Za-z0-9\\._:-]+>|\/>/,
/**
* @param {RegExpMatchArray} match
* @param {CallbackResponse} response
*/
isTrulyOpeningTag: (match, response) => {
const afterMatchIndex = match[0].length + match.index;
const nextChar = match.input[afterMatchIndex];
// nested type?
// HTML should not include another raw `<` inside a tag
// But a type might: `<Array<Array<number>>`, etc.
if (nextChar === "<") {
response.ignoreMatch();
return;
}
// <something>
// This is now either a tag or a type.
if (nextChar === ">") {
// if we cannot find a matching closing tag, then we
// will ignore it
if (!hasClosingTag(match, { after: afterMatchIndex })) {
response.ignoreMatch();
}
}
}
};
const KEYWORDS$1 = {
$pattern: IDENT_RE,
keyword: KEYWORDS.concat(TS_SPECIFIC_KEYWORDS).join(" "),
keyword: KEYWORDS.join(" "),
literal: LITERALS.join(" "),
built_in: BUILT_INS.concat(TYPES).join(" ")
built_in: BUILT_INS.join(" ")
};
var DECORATOR = {
className: 'meta',
begin: '@' + IDENT_RE$1,
};
var NUMBER = {
const nonDecimalLiterals = (prefixLetters, validChars) =>
`\\b0[${prefixLetters}][${validChars}]([${validChars}_]*[${validChars}])?n?`;
const noLeadingZeroDecimalDigits = /[1-9]([0-9_]*\d)?/;
const decimalDigits = /\d([0-9_]*\d)?/;
const exponentPart = concat(/[eE][+-]?/, decimalDigits);
const NUMBER = {
className: 'number',
variants: [
{ begin: '\\b(0[bB][01]+)n?' },
{ begin: '\\b(0[oO][0-7]+)n?' },
{ begin: hljs.C_NUMBER_RE + 'n?' }
{ begin: nonDecimalLiterals('bB', '01') }, // Binary literals
{ begin: nonDecimalLiterals('oO', '0-7') }, // Octal literals
{ begin: nonDecimalLiterals('xX', '0-9a-fA-F') }, // Hexadecimal literals
{ begin: concat(/\b/, noLeadingZeroDecimalDigits, 'n') }, // Non-zero BigInt literals
{ begin: concat(/(\b0)?\./, decimalDigits, optional(exponentPart)) }, // Decimal literals between 0 and 1
{ begin: concat(
/\b/,
noLeadingZeroDecimalDigits,
optional(concat(/\./, optional(decimalDigits))), // fractional part
optional(exponentPart)
) }, // Decimal literals >= 1
{ begin: /\b0[\.n]?/ }, // Zero literals (`0`, `0.`, `0n`)
],
relevance: 0
};
var SUBST = {
const SUBST = {
className: 'subst',
begin: '\\$\\{', end: '\\}',
begin: '\\$\\{',
end: '\\}',
keywords: KEYWORDS$1,
contains: [] // defined later
};
var HTML_TEMPLATE = {
begin: 'html`', end: '',
const HTML_TEMPLATE = {
begin: 'html`',
end: '',
starts: {
end: '`', returnEnd: false,
end: '`',
returnEnd: false,
contains: [

@@ -207,9 +277,11 @@ hljs.BACKSLASH_ESCAPE,

],
subLanguage: 'xml',
subLanguage: 'xml'
}
};
var CSS_TEMPLATE = {
begin: 'css`', end: '',
const CSS_TEMPLATE = {
begin: 'css`',
end: '',
starts: {
end: '`', returnEnd: false,
end: '`',
returnEnd: false,
contains: [

@@ -219,8 +291,9 @@ hljs.BACKSLASH_ESCAPE,

],
subLanguage: 'css',
subLanguage: 'css'
}
};
var TEMPLATE_STRING = {
const TEMPLATE_STRING = {
className: 'string',
begin: '`', end: '`',
begin: '`',
end: '`',
contains: [

@@ -231,3 +304,44 @@ hljs.BACKSLASH_ESCAPE,

};
SUBST.contains = [
const JSDOC_COMMENT = hljs.COMMENT(
'/\\*\\*',
'\\*/',
{
relevance: 0,
contains: [
{
className: 'doctag',
begin: '@[A-Za-z]+',
contains: [
{
className: 'type',
begin: '\\{',
end: '\\}',
relevance: 0
},
{
className: 'variable',
begin: IDENT_RE$1 + '(?=\\s*(-)|$)',
endsParent: true,
relevance: 0
},
// eat spaces (not newlines) so we can find
// types or variables
{
begin: /(?=[^\n])\s/,
relevance: 0
}
]
}
]
}
);
const COMMENT = {
className: "comment",
variants: [
JSDOC_COMMENT,
hljs.C_BLOCK_COMMENT_MODE,
hljs.C_LINE_COMMENT_MODE
]
};
const SUBST_INTERNALS = [
hljs.APOS_STRING_MODE,

@@ -241,37 +355,51 @@ hljs.QUOTE_STRING_MODE,

];
var ARGUMENTS =
{
begin: '\\(',
SUBST.contains = SUBST_INTERNALS
.concat({
// we need to pair up {} inside our subst to prevent
// it from ending too early by matching another }
begin: /{/,
end: /}/,
keywords: KEYWORDS$1,
contains: [
"self"
].concat(SUBST_INTERNALS)
});
const SUBST_AND_COMMENTS = [].concat(COMMENT, SUBST.contains);
const PARAMS_CONTAINS = SUBST_AND_COMMENTS.concat([
// eat recursive parens in sub expressions
{
begin: /\(/,
end: /\)/,
keywords: KEYWORDS$1,
contains: ["self"].concat(SUBST_AND_COMMENTS)
}
]);
const PARAMS = {
className: 'params',
begin: /\(/,
end: /\)/,
keywords: KEYWORDS$1,
contains: [
'self',
hljs.QUOTE_STRING_MODE,
hljs.APOS_STRING_MODE,
hljs.NUMBER_MODE
]
};
var PARAMS = {
className: 'params',
begin: /\(/, end: /\)/,
excludeBegin: true,
excludeEnd: true,
keywords: KEYWORDS$1,
contains: [
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
DECORATOR,
ARGUMENTS
]
contains: PARAMS_CONTAINS
};
return {
name: 'TypeScript',
aliases: ['ts'],
name: 'Javascript',
aliases: ['js', 'jsx', 'mjs', 'cjs'],
keywords: KEYWORDS$1,
// this will be extended by TypeScript
exports: { PARAMS_CONTAINS },
illegal: /#(?![$_A-z])/,
contains: [
hljs.SHEBANG(),
hljs.SHEBANG({
label: "shebang",
binary: "node",
relevance: 5
}),
{
label: "use_strict",
className: 'meta',
begin: /^\s*['"]use strict['"]/
relevance: 10,
begin: /^\s*['"]use (strict|asm)['"]/
},

@@ -283,5 +411,32 @@ hljs.APOS_STRING_MODE,

TEMPLATE_STRING,
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
COMMENT,
NUMBER,
{ // object attr container
begin: concat(/[{,\n]\s*/,
// we need to look ahead to make sure that we actually have an
// attribute coming up so we don't steal a comma from a potential
// "value" container
//
// NOTE: this might not work how you think. We don't actually always
// enter this mode and stay. Instead it might merely match `,
// <comments up next>` and then immediately end after the , because it
// fails to find any actual attrs. But this still does the job because
// it prevents the value contain rule from grabbing this instead and
// prevening this rule from firing when we actually DO have keys.
lookahead(concat(
// we also need to allow for multiple possible comments inbetween
// the first key:value pairing
/(\/\/.*$)*/,
/(\/\*(.|\n)*\*\/)*/,
/\s*/,
IDENT_RE$1 + '\\s*:'))),
relevance: 0,
contains: [
{
className: 'attr',
begin: IDENT_RE$1 + lookahead('\\s*:'),
relevance: 0
}
]
},
{ // "value" container

@@ -291,4 +446,3 @@ begin: '(' + hljs.RE_STARTERS_RE + '|\\b(case|return|throw)\\b)\\s*',

contains: [
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
COMMENT,
hljs.REGEXP_MODE,

@@ -300,8 +454,10 @@ {

// sub-expressions inside also surrounded by parens.
begin: '(\\([^(]*' +
'(\\([^(]*' +
'(\\([^(]*' +
'\\))?' +
'\\))?' +
'\\)|' + hljs.UNDERSCORE_IDENT_RE + ')\\s*=>', returnBegin: true,
begin: '(\\(' +
'[^()]*(\\(' +
'[^()]*(\\(' +
'[^()]*' +
'\\))*[^()]*' +
'\\))*[^()]*' +
'\\)|' + hljs.UNDERSCORE_IDENT_RE + ')\\s*=>',
returnBegin: true,
end: '\\s*=>',

@@ -321,6 +477,8 @@ contains: [

{
begin: /\(/, end: /\)/,
excludeBegin: true, excludeEnd: true,
begin: /\(/,
end: /\)/,
excludeBegin: true,
excludeEnd: true,
keywords: KEYWORDS$1,
contains: ARGUMENTS.contains
contains: PARAMS_CONTAINS
}

@@ -330,2 +488,32 @@ ]

]
},
{ // could be a comma delimited list of params to a function call
begin: /,/, relevance: 0
},
{
className: '',
begin: /\s/,
end: /\s*/,
skip: true
},
{ // JSX
variants: [
{ begin: FRAGMENT.begin, end: FRAGMENT.end },
{
begin: XML_TAG.begin,
// we carefully check the opening tag to see if it truly
// is a tag and not a false positive
'on:begin': XML_TAG.isTrulyOpeningTag,
end: XML_TAG.end
}
],
subLanguage: 'xml',
contains: [
{
begin: XML_TAG.begin,
end: XML_TAG.end,
skip: true,
contains: ['self']
}
]
}

@@ -337,3 +525,5 @@ ],

className: 'function',
beginKeywords: 'function', end: /[\{;]/, excludeEnd: true,
beginKeywords: 'function',
end: /[{;]/,
excludeEnd: true,
keywords: KEYWORDS$1,

@@ -345,32 +535,67 @@ contains: [

],
illegal: /%/,
relevance: 0 // () => {} is more typical in TypeScript
illegal: /%/
},
{
beginKeywords: 'constructor', end: /[\{;]/, excludeEnd: true,
className: 'function',
// we have to count the parens to make sure we actually have the correct
// bounding ( ). There could be any number of sub-expressions inside
// also surrounded by parens.
begin: hljs.UNDERSCORE_IDENT_RE +
'\\(' + // first parens
'[^()]*(\\(' +
'[^()]*(\\(' +
'[^()]*' +
'\\))*[^()]*' +
'\\))*[^()]*' +
'\\)\\s*{', // end parens
returnBegin:true,
contains: [
'self',
PARAMS
PARAMS,
hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1 }),
]
},
{ // prevent references like module.id from being highlighted as module definitions
begin: /module\./,
keywords: { built_in: 'module' },
// hack: prevents detection of keywords in some circumstances
// .keyword()
// $keyword = x
{
variants: [
{ begin: '\\.' + IDENT_RE$1 },
{ begin: '\\$' + IDENT_RE$1 }
],
relevance: 0
},
{ // ES6 class
className: 'class',
beginKeywords: 'class',
end: /[{;=]/,
excludeEnd: true,
illegal: /[:"\[\]]/,
contains: [
{ beginKeywords: 'extends' },
hljs.UNDERSCORE_TITLE_MODE
]
},
{
beginKeywords: 'module', end: /\{/, excludeEnd: true
begin: /\b(?=constructor)/,
end: /[\{;]/,
excludeEnd: true,
contains: [
hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1 }),
'self',
PARAMS
]
},
{
beginKeywords: 'interface', end: /\{/, excludeEnd: true,
keywords: 'interface extends'
begin: '(get|set)\\s+(?=' + IDENT_RE$1 + '\\()',
end: /{/,
keywords: "get set",
contains: [
hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1 }),
{ begin: /\(\)/ }, // eat to avoid empty params
PARAMS
]
},
{
begin: /\$[(.]/ // relevance booster for a pattern common to JS libs: `$(something)` and `$.something`
},
{
begin: '\\.' + hljs.IDENT_RE, relevance: 0 // hack: prevents detection of keywords after dots
},
DECORATOR,
ARGUMENTS
}
]

@@ -380,2 +605,95 @@ };

/*
Language: TypeScript
Author: Panu Horsmalahti <panu.horsmalahti@iki.fi>
Contributors: Ike Ku <dempfi@yahoo.com>
Description: TypeScript is a strict superset of JavaScript
Website: https://www.typescriptlang.org
Category: common, scripting
*/
/** @type LanguageFn */
function typescript(hljs) {
const IDENT_RE$1 = IDENT_RE;
const NAMESPACE = {
beginKeywords: 'namespace', end: /\{/, excludeEnd: true
};
const INTERFACE = {
beginKeywords: 'interface', end: /\{/, excludeEnd: true,
keywords: 'interface extends'
};
const USE_STRICT = {
className: 'meta',
relevance: 10,
begin: /^\s*['"]use strict['"]/
};
const TYPES = [
"any",
"void",
"number",
"boolean",
"string",
"object",
"never",
"enum"
];
const TS_SPECIFIC_KEYWORDS = [
"type",
"namespace",
"typedef",
"interface",
"public",
"private",
"protected",
"implements",
"declare",
"abstract",
"readonly"
];
const KEYWORDS$1 = {
$pattern: IDENT_RE,
keyword: KEYWORDS.concat(TS_SPECIFIC_KEYWORDS).join(" "),
literal: LITERALS.join(" "),
built_in: BUILT_INS.concat(TYPES).join(" ")
};
const DECORATOR = {
className: 'meta',
begin: '@' + IDENT_RE$1,
};
const swapMode = (mode, label, replacement) => {
const indx = mode.contains.findIndex(m => m.label === label);
if (indx === -1) { throw new Error("can not find mode to replace"); }
mode.contains.splice(indx, 1, replacement);
};
const tsLanguage = javascript(hljs);
// this should update anywhere keywords is used since
// it will be the same actual JS object
Object.assign(tsLanguage.keywords, KEYWORDS$1);
tsLanguage.exports.PARAMS_CONTAINS.push(DECORATOR);
tsLanguage.contains = tsLanguage.contains.concat([
DECORATOR,
NAMESPACE,
INTERFACE,
]);
// TS gets a simpler shebang rule than JS
swapMode(tsLanguage, "shebang", hljs.SHEBANG());
// JS use strict rule purposely excludes `asm` which makes no sense
swapMode(tsLanguage, "use_strict", USE_STRICT);
const functionDeclaration = tsLanguage.contains.find(m => m.className === "function");
functionDeclaration.relevance = 0; // () => {} is more typical in TypeScript
Object.assign(tsLanguage, {
name: 'TypeScript',
aliases: ['ts']
});
return tsLanguage;
}
module.exports = typescript;

@@ -9,3 +9,3 @@ {

"homepage": "https://highlightjs.org/",
"version": "10.2.1",
"version": "10.3.0",
"author": {

@@ -1127,2 +1127,18 @@ "name": "Ivan Sagalaev",

"email": "lioshi@lioshi.com"
},
{
"name": "David Pine",
"email": "david.pine.7@gmail.com"
},
{
"name": "Konrad Rudolph",
"email": "konrad.rudolph@gmail.com"
},
{
"name": "Tom Wallace",
"email": "thomasmichaelwallace@gmail.com"
},
{
"name": "Michael Newton",
"email": "miken32@github"
}

@@ -1157,13 +1173,13 @@ ],

"devDependencies": {
"@typescript-eslint/eslint-plugin": "^3.2.0",
"@typescript-eslint/parser": "^3.2.0",
"@typescript-eslint/eslint-plugin": "^4.4.0",
"@typescript-eslint/parser": "^4.4.0",
"clean-css": "^4.2.3",
"cli-table": "^0.3.1",
"colors": "^1.1.2",
"commander": "^5.1.0",
"del": "^5.1.0",
"commander": "^6.1.0",
"del": "^6.0.0",
"dependency-resolver": "^2.0.1",
"eslint": "^7.2.0",
"eslint": "^7.11.0",
"eslint-config-standard": "^14.1.1",
"eslint-plugin-import": "^2.21.2",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-node": "^11.1.0",

@@ -1175,15 +1191,15 @@ "eslint-plugin-promise": "^4.2.1",

"handlebars": "^4.7.6",
"js-beautify": "^1.11.0",
"jsdom": "^16.2.2",
"lodash": "^4.17.19",
"js-beautify": "^1.13.0",
"jsdom": "^16.4.0",
"lodash": "^4.17.20",
"mocha": "^8.1.3",
"rollup": "^2.0.0",
"rollup": "^2.29.0",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-json": "^4.0.0",
"should": "^13.2.3",
"terser": "^4.3.9",
"terser": "^5.3.4",
"tiny-worker": "^2.3.0",
"typescript": "^4.0.0-dev.20200512"
"typescript": "^4.0.3"
},
"dependencies": {}
}

@@ -157,6 +157,7 @@ // For TS consumers who use Node and don't have dom in their tsconfig lib, import the necessary types here.

disableAutodetect?: boolean
contains: ("self"|Mode)[]
contains: (Mode)[]
case_insensitive?: boolean
keywords?: Record<string, any> | string
compiled?: boolean
compiled?: boolean,
exports?: any
}

@@ -217,2 +218,3 @@

compiled?: boolean
label?: string
}

@@ -219,0 +221,0 @@

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc