Socket
Socket
Sign inDemoInstall

highlight.js

Package Overview
Dependencies
Maintainers
2
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

highlight.js - npm Package Compare versions

Comparing version 8.5.0 to 8.6.0

docs/release-process.rst

34

lib/highlight.js

@@ -19,3 +19,3 @@ /*

if(typeof define === 'function' && define.amd) {
define([], function() {
define('hljs', [], function() {
return window.hljs;

@@ -43,6 +43,25 @@ });

function isNotHighlighted(language) {
return /no-?highlight|plain|text/.test(language);
}
function blockLanguage(block) {
var classes = (block.className + ' ' + (block.parentNode ? block.parentNode.className : '')).split(/\s+/);
classes = classes.map(function(c) {return c.replace(/^lang(uage)?-/, '');});
return classes.filter(function(c) {return getLanguage(c) || /no(-?)highlight|plain|text/.test(c);})[0];
var i, match, length,
classes = block.className + ' ';
classes += block.parentNode ? block.parentNode.className : '';
// language-* takes precedence over non-prefixed class names and
match = /\blang(?:uage)?-([\w-]+)\b/.exec(classes);
if (match) {
return getLanguage(match[1]) ? match[1] : 'no-highlight';
}
classes = classes.split(/\s+/);
for(i = 0, length = classes.length; i < length; i++) {
if(getLanguage(classes[i]) || isNotHighlighted(classes[i])) {
return classes[i];
}
}
}

@@ -548,3 +567,3 @@

var language = blockLanguage(block);
if (/no(-?)highlight|plain|text/.test(language))
if (isNotHighlighted(language))
return;

@@ -687,2 +706,7 @@

mode.contains.push(hljs.PHRASAL_WORDS_MODE);
mode.contains.push({
className: 'doctag',
beginKeywords: "TODO FIXME NOTE BUG XXX",
relevance: 0
});
return mode;

@@ -689,0 +713,0 @@ };

@@ -7,2 +7,3 @@ var hljs = require('./highlight');

hljs.registerLanguage('applescript', require('./languages/applescript'));
hljs.registerLanguage('armasm', require('./languages/armasm'));
hljs.registerLanguage('xml', require('./languages/xml'));

@@ -16,3 +17,5 @@ hljs.registerLanguage('asciidoc', require('./languages/asciidoc'));

hljs.registerLanguage('brainfuck', require('./languages/brainfuck'));
hljs.registerLanguage('cal', require('./languages/cal'));
hljs.registerLanguage('capnproto', require('./languages/capnproto'));
hljs.registerLanguage('ceylon', require('./languages/ceylon'));
hljs.registerLanguage('clojure', require('./languages/clojure'));

@@ -31,2 +34,3 @@ hljs.registerLanguage('clojure-repl', require('./languages/clojure-repl'));

hljs.registerLanguage('django', require('./languages/django'));
hljs.registerLanguage('dns', require('./languages/dns'));
hljs.registerLanguage('dockerfile', require('./languages/dockerfile'));

@@ -54,2 +58,3 @@ hljs.registerLanguage('dos', require('./languages/dos'));

hljs.registerLanguage('http', require('./languages/http'));
hljs.registerLanguage('inform7', require('./languages/inform7'));
hljs.registerLanguage('ini', require('./languages/ini'));

@@ -80,2 +85,3 @@ hljs.registerLanguage('java', require('./languages/java'));

hljs.registerLanguage('ocaml', require('./languages/ocaml'));
hljs.registerLanguage('openscad', require('./languages/openscad'));
hljs.registerLanguage('oxygene', require('./languages/oxygene'));

@@ -115,2 +121,3 @@ hljs.registerLanguage('parser3', require('./languages/parser3'));

hljs.registerLanguage('thrift', require('./languages/thrift'));
hljs.registerLanguage('tp', require('./languages/tp'));
hljs.registerLanguage('twig', require('./languages/twig'));

@@ -117,0 +124,0 @@ hljs.registerLanguage('typescript', require('./languages/typescript'));

24

lib/languages/aspectj.js

@@ -16,12 +16,13 @@ module.exports = function (hljs) {

contains : [
{
className : 'javadoc',
begin : '/\\*\\*',
end : '\\*/',
relevance : 0,
contains : [{
className : 'javadoctag',
begin : '(^|\\s)@[A-Za-z]+'
}]
},
hljs.COMMENT(
'/\\*\\*',
'\\*/',
{
relevance : 0,
contains : [{
className : 'doctag',
begin : '@[A-Za-z]+'
}]
}
),
hljs.C_LINE_COMMENT_MODE,

@@ -37,3 +38,4 @@ hljs.C_BLOCK_COMMENT_MODE,

illegal : /[:;"\[\]]/,
contains : [{
contains : [
{
beginKeywords : 'extends implements pertypewithin perthis pertarget percflowbelow percflow issingleton'

@@ -40,0 +42,0 @@ },

module.exports = function(hljs) {
var CPP_PRIMATIVE_TYPES = {
className: 'keyword',
begin: '[a-z\\d_]*_t'
};
var CPP_KEYWORDS = {

@@ -8,14 +13,7 @@ keyword: 'false int float while private char catch export virtual operator sizeof ' +

'short reinterpret_cast|10 default double register explicit signed typename try this ' +
'switch continue wchar_t inline delete alignof char16_t char32_t constexpr decltype ' +
'switch continue inline delete alignof constexpr decltype ' +
'noexcept nullptr static_assert thread_local restrict _Bool complex _Complex _Imaginary ' +
'intmax_t uintmax_t int8_t uint8_t int16_t uint16_t int32_t uint32_t int64_t uint64_t ' +
'int_least8_t uint_least8_t int_least16_t uint_least16_t int_least32_t uint_least32_t ' +
'int_least64_t uint_least64_t int_fast8_t uint_fast8_t int_fast16_t uint_fast16_t int_fast32_t ' +
'uint_fast32_t int_fast64_t uint_fast64_t intptr_t uintptr_t atomic_bool atomic_char atomic_schar ' +
'atomic_bool atomic_char atomic_schar ' +
'atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong ' +
'atomic_ullong atomic_wchar_t atomic_char16_t atomic_char32_t atomic_intmax_t atomic_uintmax_t ' +
'atomic_intptr_t atomic_uintptr_t atomic_size_t atomic_ptrdiff_t atomic_int_least8_t atomic_int_least16_t ' +
'atomic_int_least32_t atomic_int_least64_t atomic_uint_least8_t atomic_uint_least16_t atomic_uint_least32_t ' +
'atomic_uint_least64_t atomic_int_fast8_t atomic_int_fast16_t atomic_int_fast32_t atomic_int_fast64_t ' +
'atomic_uint_fast8_t atomic_uint_fast16_t atomic_uint_fast32_t atomic_uint_fast64_t',
'atomic_ullong',
built_in: 'std string cin cout cerr clog stringstream istringstream ostringstream ' +

@@ -36,9 +34,18 @@ 'auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set ' +

contains: [
CPP_PRIMATIVE_TYPES,
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
hljs.QUOTE_STRING_MODE,
{
className: 'string',
begin: '\'\\\\?.', end: '\'',
illegal: '.'
variants: [
hljs.inherit(hljs.QUOTE_STRING_MODE, { begin: '((u8?|U)|L)?"' }),
{
begin: '(u8?|U)?R"', end: '"',
contains: [hljs.BACKSLASH_ESCAPE]
},
{
begin: '\'\\\\?.', end: '\'',
illegal: '.'
}
]
},

@@ -69,3 +76,3 @@ {

keywords: CPP_KEYWORDS,
contains: ['self']
contains: ['self', CPP_PRIMATIVE_TYPES]
},

@@ -72,0 +79,0 @@ {

@@ -59,3 +59,3 @@ module.exports = function(hljs) {

{
beginKeywords: 'class namespace interface', end: /[{;=]/,
beginKeywords: 'class interface', end: /[{;=]/,
illegal: /[^\s:]/,

@@ -69,2 +69,16 @@ contains: [

{
beginKeywords: 'namespace', end: /[{;=]/,
illegal: /[^\s:]/,
contains: [
{
// Customization of hljs.TITLE_MODE that allows '.'
className: 'title',
begin: '[a-zA-Z](\\.?\\w)*',
relevance: 0
},
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE
]
},
{
// Expression keywords prevent 'keyword Name(...)' from being

@@ -89,2 +103,4 @@ // recognized as a function definition

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

@@ -91,0 +107,0 @@ relevance: 0,

@@ -40,3 +40,3 @@ module.exports = function(hljs) {

case_insensitive: true,
illegal: /[=\/|']/,
illegal: /[=\/|'\$]/,
contains: [

@@ -49,4 +49,3 @@ hljs.C_BLOCK_COMMENT_MODE,

{
className: 'class', begin: /\.[A-Za-z0-9_-]+/,
relevance: 0
className: 'class', begin: /\.[A-Za-z0-9_-]+/
},

@@ -98,3 +97,2 @@ {

illegal: /\S/,
relevance: 0,
contains: [

@@ -101,0 +99,0 @@ hljs.C_BLOCK_COMMENT_MODE,

@@ -65,14 +65,18 @@ module.exports = function (hljs) {

STRING,
{
className: 'dartdoc',
begin: '/\\*\\*', end: '\\*/',
subLanguage: 'markdown',
subLanguageMode: 'continuous'
},
{
className: 'dartdoc',
begin: '///', end: '$',
subLanguage: 'markdown',
subLanguageMode: 'continuous'
},
hljs.COMMENT(
'/\\*\\*',
'\\*/',
{
subLanguage: 'markdown',
subLanguageMode: 'continuous'
}
),
hljs.COMMENT(
'///',
'$',
{
subLanguage: 'markdown',
subLanguageMode: 'continuous'
}
),
hljs.C_LINE_COMMENT_MODE,

@@ -79,0 +83,0 @@ hljs.C_BLOCK_COMMENT_MODE,

@@ -12,4 +12,9 @@ module.exports = function (hljs) {

{
className: 'string',
begin: '\\|', end: '\\$'
begin: '\\|', end: '\\|\\w*$',
contains: [
{
className: 'string',
begin: '[^|]+'
}
]
},

@@ -16,0 +21,0 @@ {

@@ -7,5 +7,5 @@ module.exports = function(hljs) {

keyword:
// groovy specific keywords
// groovy specific keywords
'def as in assert trait ' +
// common keywords with Java
// common keywords with Java
'super this abstract static volatile transient public private protected synchronized final ' +

@@ -17,13 +17,14 @@ 'class interface enum if else for while switch case break default continue ' +

contains: [
hljs.COMMENT(
'/\\*\\*',
'\\*/',
{
relevance : 0,
contains : [{
className : 'doctag',
begin : '@[A-Za-z]+'
}]
}
),
hljs.C_LINE_COMMENT_MODE,
{
className: 'javadoc',
begin: '/\\*\\*', end: '\\*//*',
relevance: 0,
contains: [
{
className: 'javadoctag', begin: '(^|\\s)@[A-Za-z]+'
}
]
},
hljs.C_BLOCK_COMMENT_MODE,

@@ -30,0 +31,0 @@ {

@@ -36,3 +36,3 @@ module.exports = // TODO support filter tags like :javascript, support inline HTML

className: 'value',
begin: '[#\\.]\\w+'
begin: '[#\\.][\\w-]+'
},

@@ -55,13 +55,5 @@ {

},
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,
{
className: 'string',
begin: '"',
end: '"'
},
{
className: 'string',
begin: '\'',
end: '\''
},
{
begin: '\\w+',

@@ -91,13 +83,5 @@ relevance: 0

},
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,
{
className: 'string',
begin: '"',
end: '"'
},
{
className: 'string',
begin: '\'',
end: '\''
},
{
begin: '\\w+',

@@ -104,0 +88,0 @@ relevance: 0

@@ -10,3 +10,16 @@ module.exports = function(hljs) {

// https://docs.oracle.com/javase/7/docs/technotes/guides/language/underscores-literals.html
var JAVA_NUMBER_RE = '(\\b(0b[01_]+)|\\b0[xX][a-fA-F0-9_]+|(\\b[\\d_]+(\\.[\\d_]*)?|\\.[\\d_]+)([eE][-+]?\\d+)?)[lLfF]?'; // 0b..., 0x..., 0..., decimal, float
var JAVA_NUMBER_RE = '\\b' +
'(' +
'0[bB]([01]+[01_]+[01]+|[01]+)' + // 0b...
'|' +
'0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)' + // 0x...
'|' +
'(' +
'([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?' +
'|' +
'\\.([\\d]+[\\d_]+[\\d]+|[\\d]+)' +
')' +
'([eE][-+]?\\d+)?' + // octal, decimal, float
')' +
'[lLfF]?';
var JAVA_NUMBER_MODE = {

@@ -23,10 +36,13 @@ className: 'number',

contains: [
{
className: 'javadoc',
begin: '/\\*\\*', end: '\\*/',
relevance: 0,
contains: [{
className: 'javadoctag', begin: '(^|\\s)@[A-Za-z]+'
}]
},
hljs.COMMENT(
'/\\*\\*',
'\\*/',
{
relevance : 0,
contains : [{
className : 'doctag',
begin : '@[A-Za-z]+'
}]
}
),
hljs.C_LINE_COMMENT_MODE,

@@ -49,3 +65,3 @@ hljs.C_BLOCK_COMMENT_MODE,

// recognized as a function definition
beginKeywords: 'new throw return',
beginKeywords: 'new throw return else',
relevance: 0

@@ -52,0 +68,0 @@ },

@@ -8,3 +8,3 @@ module.exports = function(hljs) {

'instanceof with throw case default try this switch continue typeof delete ' +
'let yield const export super debugger as await',
'let yield const export super debugger as async await',
literal:

@@ -26,6 +26,3 @@ 'true false null undefined NaN Infinity',

relevance: 10,
variants: [
{begin: /^\s*('|")use strict('|")/},
{begin: /^\s*('|")use asm('|")/}
]
begin: /^\s*['"]use (strict|asm)['"]/
},

@@ -49,3 +46,7 @@ hljs.APOS_STRING_MODE,

className: 'number',
begin: '\\b(0[xXbBoO][a-fA-F0-9]+|(\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)', // 0x..., 0..., 0b..., 0o..., decimal, float
variants: [
{ begin: '\\b(0[bB][01]+)' },
{ begin: '\\b(0[oO][0-7]+)' },
{ begin: hljs.C_NUMBER_RE }
],
relevance: 0

@@ -76,2 +77,4 @@ },

begin: /\(/, end: /\)/,
excludeBegin: true,
excludeEnd: true,
contains: [

@@ -78,0 +81,0 @@ hljs.C_LINE_COMMENT_MODE,

module.exports = function (hljs) {
var KEYWORDS = 'val var get set class trait object public open private protected ' +
'final enum if else do while for when break continue throw try catch finally ' +
'import package is as in return fun override default companion reified inline volatile transient native';
'final enum if else do while for when break continue throw try catch finally ' +
'import package is as in return fun override default companion reified inline volatile transient native';
return {
keywords: {
typename : 'Byte Short Char Int Long Boolean Float Double Void Unit Nothing',
literal : 'true false null',
typename: 'Byte Short Char Int Long Boolean Float Double Void Unit Nothing',
literal: 'true false null',
keyword: KEYWORDS
},
contains : [
hljs.COMMENT(
'/\\*\\*',
'\\*/',
{
relevance : 0,
contains : [{
className : 'doctag',
begin : '@[A-Za-z]+'
}]
}
),
hljs.C_LINE_COMMENT_MODE,
{
className: 'javadoc',
begin: '/\\*\\*', end: '\\*//*',
relevance: 0,
contains: [
{
className: 'javadoctag', begin: '(^|\\s)@[A-Za-z]+'
}
]
},
hljs.C_BLOCK_COMMENT_MODE,
{
className: 'type',
begin: /</, end: />/,
returnBegin: true,
excludeEnd: false,
relevance: 0
className: 'type',
begin: /</, end: />/,
returnBegin: true,
excludeEnd: false,
relevance: 0
},
{
className: 'function',
beginKeywords: 'fun', end: '[(]|$',
returnBegin: true,
excludeEnd : true,
keywords: KEYWORDS,
illegal: /fun\s+(<.*>)?[^\s\(]+(\s+[^\s\(]+)\s*=/,
relevance : 5,
contains: [
{
className: 'function',
beginKeywords: 'fun', end: '[(]|$',
returnBegin: true,
excludeEnd: true,
keywords: KEYWORDS,
illegal: /fun\s+(<.*>)?[^\s\(]+(\s+[^\s\(]+)\s*=/,
relevance: 5,
contains: [
{
begin: hljs.UNDERSCORE_IDENT_RE + '\\s*\\(', returnBegin: true,

@@ -46,8 +47,8 @@ relevance: 0,

},
{
className : 'type',
begin: /</, end : />/, keywords: 'reified',
relevance: 0
},
{
className: 'type',
begin: /</, end: />/, keywords: 'reified',
relevance: 0
},
{
className: 'params',

@@ -57,9 +58,9 @@ begin: /\(/, end: /\)/,

relevance: 0,
illegal : /\([^\(,\s:]+,/,
illegal: /\([^\(,\s:]+,/,
contains: [
{
className: 'typename',
begin: /:\s*/, end: /\s*[=\)]/, excludeBegin: true, returnEnd: true,
relevance: 0
}
{
className: 'typename',
begin: /:\s*/, end: /\s*[=\)]/, excludeBegin: true, returnEnd: true,
relevance: 0
}
]

@@ -69,30 +70,30 @@ },

hljs.C_BLOCK_COMMENT_MODE
]
]
},
{
className: 'class',
beginKeywords: 'class trait', end: /[:\{(]|$/,
excludeEnd : true,
illegal: 'extends implements',
contains: [
hljs.UNDERSCORE_TITLE_MODE,
{
className : 'type',
begin: /</, end : />/, excludeBegin: true, excludeEnd: true,
relevance: 0
},
{
className : 'typename',
begin : /[,:]\s*/, end : /[<\(,]|$/, excludeBegin: true, returnEnd: true
}
]
className: 'class',
beginKeywords: 'class trait', end: /[:\{(]|$/,
excludeEnd: true,
illegal: 'extends implements',
contains: [
hljs.UNDERSCORE_TITLE_MODE,
{
className: 'type',
begin: /</, end: />/, excludeBegin: true, excludeEnd: true,
relevance: 0
},
{
className: 'typename',
begin: /[,:]\s*/, end: /[<\(,]|$/, excludeBegin: true, returnEnd: true
}
]
},
{
className: 'variable', beginKeywords: 'var val', end : /\s*[=:$]/, excludeEnd: true
className: 'variable', beginKeywords: 'var val', end: /\s*[=:$]/, excludeEnd: true
},
hljs.QUOTE_STRING_MODE,
{
className: 'shebang',
begin: "^#!/usr/bin/env", end: '$',
illegal: '\n'
className: 'shebang',
begin: "^#!/usr/bin/env", end: '$',
illegal: '\n'
},

@@ -99,0 +100,0 @@ hljs.C_NUMBER_MODE

@@ -59,8 +59,7 @@ module.exports = function(hljs) {

var LASSO_CODE = [
hljs.COMMENT(
'/\\*\\*!',
'\\*/'
),
hljs.C_LINE_COMMENT_MODE,
{
className: 'javadoc',
begin: '/\\*\\*!', end: '\\*/',
contains: [hljs.PHRASAL_WORDS_MODE]
},
hljs.C_BLOCK_COMMENT_MODE,

@@ -67,0 +66,0 @@ hljs.inherit(hljs.C_NUMBER_MODE, {begin: hljs.C_NUMBER_RE + '|(-?infinity|nan)\\b'}),

@@ -118,3 +118,4 @@ module.exports = function(hljs) {

className: 'function',
beginKeywords: 'end', end: '$',
begin: '\\bend\\s+', end: '$',
keywords: 'end',
contains: [

@@ -139,22 +140,12 @@ TITLE2,

{
className: 'command',
beginKeywords: 'end', end: '$',
contains: [
TITLE2,
TITLE1
className: 'preprocessor',
variants: [
{
begin: '<\\?(rev|lc|livecode)',
relevance: 10
},
{ begin: '<\\?' },
{ begin: '\\?>' }
]
},
{
className: 'preprocessor',
begin: '<\\?rev|<\\?lc|<\\?livecode',
relevance: 10
},
{
className: 'preprocessor',
begin: '<\\?'
},
{
className: 'preprocessor',
begin: '\\?>'
},
hljs.APOS_STRING_MODE,

@@ -161,0 +152,0 @@ hljs.QUOTE_STRING_MODE,

@@ -25,3 +25,3 @@ module.exports = function(hljs) {

return {
aliases: ['m', 'mm', 'objc', 'obj-c'],
aliases: ['mm', 'objc', 'obj-c'],
keywords: OBJC_KEYWORDS,

@@ -28,0 +28,0 @@ lexemes: LEXEMES,

@@ -44,4 +44,4 @@ module.exports = function(hljs) {

{
className: 'phpdoc',
begin: '\\s@[A-Za-z]+'
className: 'doctag',
begin: '@[A-Za-z]+'
},

@@ -48,0 +48,0 @@ PREPROCESSOR

@@ -8,3 +8,3 @@ module.exports = function(hljs) {

var YARDOCTAG = {
className: 'yardoctag',
className: 'doctag',
begin: '@[A-Za-z]+'

@@ -11,0 +11,0 @@ };

module.exports = function(hljs) {
var NUM_SUFFIX = '([uif](8|16|32|64|size))\?';
var BLOCK_COMMENT = hljs.inherit(hljs.C_BLOCK_COMMENT_MODE);

@@ -31,14 +32,18 @@ BLOCK_COMMENT.contains.push('self');

className: 'string',
begin: /r(#*)".*?"\1(?!#)/
variants: [
{ begin: /r(#*)".*?"\1(?!#)/ },
{ begin: /'\\?(x\w{2}|u\w{4}|U\w{8}|.)'/ },
{ begin: /'[a-zA-Z_][a-zA-Z0-9_]*/ }
]
},
{
className: 'string',
begin: /'\\?(x\w{2}|u\w{4}|U\w{8}|.)'/
},
{
begin: /'[a-zA-Z_][a-zA-Z0-9_]*/
},
{
className: 'number',
begin: /\b(0[xbo][A-Fa-f0-9_]+|\d[\d_]*(\.[0-9_]+)?([eE][+-]?[0-9_]+)?)([uif](8|16|32|64|size))?/,
variants: [
{ begin: '\\b0b([01_]+)' + NUM_SUFFIX },
{ begin: '\\b0o([0-7_]+)' + NUM_SUFFIX },
{ begin: '\\b0x([A-Fa-f0-9_]+)' + NUM_SUFFIX },
{ begin: '\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)' +
NUM_SUFFIX
}
],
relevance: 0

@@ -45,0 +50,0 @@ },

@@ -44,12 +44,2 @@ module.exports = function(hljs) {

var JAVADOC = {
className: 'javadoc',
begin: '/\\*\\*', end: '\\*/',
contains: [{
className: 'javadoctag',
begin: '@[A-Za-z]+'
}],
relevance: 10
};
return {

@@ -56,0 +46,0 @@ keywords: {

@@ -15,9 +15,9 @@ module.exports = function(hljs) {

'countLeadingZeros debugPrint debugPrintln distance dropFirst dropLast dump ' +
'encodeBitsAsWords enumerate equal false filter find getBridgedObjectiveCType ' +
'encodeBitsAsWords enumerate equal filter find getBridgedObjectiveCType ' +
'getVaList indices insertionSort isBridgedToObjectiveC ' +
'isBridgedVerbatimToObjectiveC isUniquelyReferenced join ' +
'lexicographicalCompare map max maxElement min minElement nil numericCast ' +
'lexicographicalCompare map max maxElement min minElement numericCast ' +
'partition posix print println quickSort reduce reflect reinterpretCast ' +
'reverse roundUpToAlignment sizeof sizeofValue sort split startsWith strideof ' +
'strideofValue swap swift toString transcode true underestimateCount ' +
'strideofValue swap swift toString transcode underestimateCount ' +
'unsafeReflect withExtendedLifetime withObjectAtPlusZero withUnsafePointer ' +

@@ -24,0 +24,0 @@ 'withUnsafePointerToObject withUnsafePointers withVaList'

module.exports = function(hljs) {
var KEYWORDS = {
keyword:
'in if for while finally var new function|0 do return void else break catch ' +
'instanceof with throw case default try this switch continue typeof delete ' +
'let yield const class public private get set super interface extends' +
'static constructor implements enum export import declare type protected',
literal:
'true false null undefined NaN Infinity',
built_in:
'eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent ' +
'encodeURI encodeURIComponent escape unescape Object Function Boolean Error ' +
'EvalError InternalError RangeError ReferenceError StopIteration SyntaxError ' +
'TypeError URIError Number Math Date String RegExp Array Float32Array ' +
'Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array ' +
'Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require ' +
'module console window document any number boolean string void'
}
return {
aliases: ['ts'],
keywords: {
keyword:
'in if for while finally var new function|0 do return void else break catch ' +
'instanceof with throw case default try this switch continue typeof delete ' +
'let yield const class public private get set super interface extends' +
'static constructor implements enum export import declare type protected',
literal:
'true false null undefined NaN Infinity',
built_in:
'eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent ' +
'encodeURI encodeURIComponent escape unescape Object Function Boolean Error ' +
'EvalError InternalError RangeError ReferenceError StopIteration SyntaxError ' +
'TypeError URIError Number Math Date String RegExp Array Float32Array ' +
'Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array ' +
'Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require ' +
'module console window document any number boolean string void'
},
keywords: KEYWORDS,
contains: [
{
className: 'pi',
begin: /^\s*('|")use strict('|")/,
begin: /^\s*['"]use strict['"]/,
relevance: 0

@@ -31,3 +33,11 @@ },

hljs.C_BLOCK_COMMENT_MODE,
hljs.C_NUMBER_MODE,
{
className: 'number',
variants: [
{ begin: '\\b(0[bB][01]+)' },
{ begin: '\\b(0[oO][0-7]+)' },
{ begin: hljs.C_NUMBER_RE }
],
relevance: 0
},
{ // "value" container

@@ -50,4 +60,6 @@ begin: '(' + hljs.RE_STARTERS_RE + '|\\b(case|return|throw)\\b)\\s*',

className: 'function',
beginKeywords: 'function', end: /\{/, excludeEnd: true,
begin: 'function', end: /[\{;]/, excludeEnd: true,
keywords: KEYWORDS,
contains: [
'self',
hljs.inherit(hljs.TITLE_MODE, {begin: /[A-Za-z$_][0-9A-Za-z$_]*/}),

@@ -57,2 +69,5 @@ {

begin: /\(/, end: /\)/,
excludeBegin: true,
excludeEnd: true,
keywords: KEYWORDS,
contains: [

@@ -70,3 +85,4 @@ hljs.C_LINE_COMMENT_MODE,

className: 'constructor',
beginKeywords: 'constructor', end: /\{/, excludeEnd: true,
begin: 'constructor', end: /\{/, excludeEnd: true,
keywords: KEYWORDS,
relevance: 10

@@ -73,0 +89,0 @@ },

@@ -80,3 +80,3 @@ module.exports = function(hljs) {

starts: {
end: '</script>', returnEnd: true,
end: '\<\/script\>', returnEnd: true,
subLanguage: ''

@@ -83,0 +83,0 @@ }

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

"homepage": "https://highlightjs.org/",
"version": "8.5.0",
"version": "8.6.0",
"author": {

@@ -643,2 +643,38 @@ "name": "Ivan Sagalaev",

"email": "raivo@infdot.com"
},
{
"name": "Kenneth Fuglsang",
"email": "kfuglsang@gmail.com"
},
{
"name": "Raivo Laanemets",
"email": "raivo@infdot.com"
},
{
"name": "David Anson",
"email": "david@dlaa.me"
},
{
"name": "Louis Barranqueiro",
"email": "louis.barranqueiro@gmail.com"
},
{
"name": "Tim Schumacher",
"email": "tim@datenknoten.me"
},
{
"name": "Lucas Werkmeister",
"email": "mail@lucaswerkmeister.de"
},
{
"name": "Dan Panzarella",
"email": "alsoelp@gmail.com"
},
{
"name": "Bruno Dias",
"email": "bruno.r.dias@gmail.com"
},
{
"name": "Jay Strybis",
"email": "jay.strybis@gmail.com"
}

@@ -649,8 +685,3 @@ ],

},
"licenses": [
{
"type": "BSD",
"url": "https://github.com/isagalaev/highlight.js/blob/master/LICENSE"
}
],
"license": "BSD-3-Clause",
"repository": {

@@ -669,11 +700,11 @@ "type": "git",

"commander": "^2.3.0",
"del": "^0.1.2",
"del": "^1.1.1",
"gear": "^0.9.4",
"gear-lib": "^0.9.2",
"glob": "^4.0.5",
"jsdom": "^1.0.3",
"glob": "^5.0.5",
"jsdom": "3.1.2",
"lodash": "^3.3.1",
"mocha": "^2.0.1",
"should": "^4.0.4"
"should": "^6.0.1"
}
}

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

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

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

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

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

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

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

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

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

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

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

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

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc