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 9.10.0 to 9.11.0

lib/languages/jboss-cli.js

14

lib/highlight.js

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

// Object map that is used to escape some common HTML characters.
var escapeRegexMap = {
'&': '&',
'<': '&lt;',
'>': '&gt;'
};

@@ -65,5 +59,3 @@ /* Utility functions */

function escape(value) {
return value.replace(/[&<>]/gm, function(character) {
return escapeRegexMap[character];
});
return value.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
}

@@ -185,3 +177,3 @@

function open(node) {
function attr_str(a) {return ' ' + a.nodeName + '="' + escape(a.value) + '"';}
function attr_str(a) {return ' ' + a.nodeName + '="' + escape(a.value).replace('"', '&quot;') + '"';}
result += '<' + tag(node) + ArrayProto.map.call(node.attributes, attr_str).join('') + '>';

@@ -747,3 +739,3 @@ }

hljs.PHRASAL_WORDS_MODE = {
begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|like)\b/
begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/
};

@@ -750,0 +742,0 @@ hljs.COMMENT = function (begin, end, inherits) {

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

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

@@ -145,2 +146,3 @@ hljs.registerLanguage('julia', require('./languages/julia'));

hljs.registerLanguage('scss', require('./languages/scss'));
hljs.registerLanguage('shell', require('./languages/shell'));
hljs.registerLanguage('smali', require('./languages/smali'));

@@ -147,0 +149,0 @@ hljs.registerLanguage('smalltalk', require('./languages/smalltalk'));

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

begin : hljs.UNDERSCORE_IDENT_RE + '\\s*\\(',
keywords : KEYWORDS + ' ' + SHORTKEYS
keywords : KEYWORDS + ' ' + SHORTKEYS,
relevance: 0
},

@@ -97,0 +98,0 @@ hljs.QUOTE_STRING_MODE

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

{ begin: '\\b(0b[01\']+)' },
{ begin: '\\b([\\d\']+(\\.[\\d\']*)?|\\.[\\d\']+)(u|U|l|L|ul|UL|f|F|b|B)' },
{ begin: '(-?)\\b([\\d\']+(\\.[\\d\']*)?|\\.[\\d\']+)(u|U|l|L|ul|UL|f|F|b|B)' },
{ begin: '(-?)(\\b0[xX][a-fA-F0-9\']+|(\\b[\\d\']+(\\.[\\d\']*)?|\\.[\\d\']+)([eE][-+]?[\\d\']+)?)' }

@@ -64,5 +64,5 @@ ],

keyword: 'int float while private char catch import module export virtual operator sizeof ' +
'dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace ' +
'dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace ' +
'unsigned long volatile static protected bool template mutable if public friend ' +
'do goto auto void enum else break extern using class asm case typeid ' +
'do goto auto void enum else break extern using asm case typeid ' +
'short reinterpret_cast|10 default double register explicit signed typename try this ' +

@@ -73,3 +73,4 @@ 'switch continue inline delete alignof constexpr decltype ' +

'atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong ' +
'atomic_ullong new throw return',
'atomic_ullong new throw return ' +
'and or not',
built_in: 'std string cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream ' +

@@ -160,2 +161,10 @@ 'auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set ' +

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

@@ -162,0 +171,0 @@ ]),

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

case_insensitive: true,
keywords: 'from maintainer expose env user onbuild',
keywords: 'from maintainer expose env arg user onbuild stopsignal',
contains: [

@@ -13,3 +13,3 @@ hljs.HASH_COMMENT_MODE,

{
beginKeywords: 'run cmd entrypoint volume add copy workdir label healthcheck',
beginKeywords: 'run cmd entrypoint volume add copy workdir label healthcheck shell',
starts: {

@@ -16,0 +16,0 @@ end: /[^\\]\n/,

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

{begin: '->|<-'} // No markup, relevance booster
]
],
illegal: /;/
};
};

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

keywords: {
keyword: 'break callback case cast catch continue default do dynamic else enum extern ' +
keyword: 'break case cast catch continue default do dynamic else enum extern ' +
'for function here if import in inline never new override package private get set ' +

@@ -13,0 +13,0 @@ 'public return static super switch this throw trace try typedef untyped using var while ' +

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

//Library methods and properties (one line per library):
'coroutine resume yield status wrap create running debug getupvalue' +
'debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv' +
'io lines write close flush open output type read stderr stdin input stdout popen tmpfile' +
'math, log, max, acos, huge, ldexp, pi, cos, tanh, pow, deg, tan, cosh, sinh, random, randomseed, frexp, ceil, floor, rad, abs, sqrt, modf, asin, min, mod, fmod, log10, atan2, exp, sin, atan' +
'os, exit, setlocale, date, getenv, difftime, remove, time, clock, tmpname, rename, execute, package, preload, loadlib, loaded, loaders, cpath, config path, seeall' +
'string, sub, upper, len, gfind, rep, find, match, char, dump, gmatch, reverse, byte, format, gsub, lower' +
'table, setn, insert, getn, foreachi, maxn, foreach, concat, sort, remove'
'coroutine resume yield status wrap create running debug getupvalue ' +
'debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv ' +
'io lines write close flush open output type read stderr stdin input stdout popen tmpfile ' +
'math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan ' +
'os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall ' +
'string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower ' +
'table setn insert getn foreachi maxn foreach concat sort remove'
},

@@ -42,0 +42,0 @@ contains: COMMENTS.concat([

module.exports = function(hljs) {
/* Variables: simple (eg $(var)) and special (eg $@) */
var VARIABLE = {
className: 'variable',
begin: /\$\(/, end: /\)/,
contains: [hljs.BACKSLASH_ESCAPE]
};
return {
aliases: ['mk', 'mak'],
contains: [
hljs.HASH_COMMENT_MODE,
variants: [
{
begin: /^\w+\s*\W*=/, returnBegin: true,
relevance: 0,
starts: {
end: /\s*\W*=/, excludeEnd: true,
starts: {
end: /$/,
relevance: 0,
contains: [
VARIABLE
]
}
}
begin: '\\$\\(' + hljs.UNDERSCORE_IDENT_RE + '\\)',
contains: [hljs.BACKSLASH_ESCAPE],
},
{
className: 'section',
begin: /^[\w]+:\s*$/
begin: /\$[@%<?\^\+\*]/
},
]
};
/* Quoted string with variables inside */
var QUOTE_STRING = {
className: 'string',
begin: /"/, end: /"/,
contains: [
hljs.BACKSLASH_ESCAPE,
VARIABLE,
]
};
/* Function: $(func arg,...) */
var FUNC = {
className: 'variable',
begin: /\$\([\w-]+\s/, end: /\)/,
keywords: {
built_in:
'subst patsubst strip findstring filter filter-out sort ' +
'word wordlist firstword lastword dir notdir suffix basename ' +
'addsuffix addprefix join wildcard realpath abspath error warning ' +
'shell origin flavor foreach if or and call eval file value',
},
contains: [
VARIABLE,
]
};
/* Variable assignment */
var VAR_ASSIG = {
begin: '^' + hljs.UNDERSCORE_IDENT_RE + '\\s*[:+?]?=',
illegal: '\\n',
returnBegin: true,
contains: [
{
className: 'meta',
begin: /^\.PHONY:/, end: /$/,
keywords: {'meta-keyword': '.PHONY'}, lexemes: /[\.\w]+/
},
{
begin: /^\t+/, end: /$/,
relevance: 0,
contains: [
hljs.QUOTE_STRING_MODE,
VARIABLE
]
begin: '^' + hljs.UNDERSCORE_IDENT_RE, end: '[:+?]?=',
excludeEnd: true,
}
]
};
/* Meta targets (.PHONY) */
var META = {
className: 'meta',
begin: /^\.PHONY:/, end: /$/,
keywords: {'meta-keyword': '.PHONY'},
lexemes: /[\.\w]+/
};
/* Targets */
var TARGET = {
className: 'section',
begin: /^[^\s]+:/, end: /$/,
contains: [VARIABLE,]
};
return {
aliases: ['mk', 'mak'],
keywords:
'define endef undefine ifdef ifndef ifeq ifneq else endif ' +
'include -include sinclude override export unexport private vpath',
lexemes: /[\w-]+/,
contains: [
hljs.HASH_COMMENT_MODE,
VARIABLE,
QUOTE_STRING,
FUNC,
VAR_ASSIG,
META,
TARGET,
]
};
};

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

begin: '(' + hljs.RE_STARTERS_RE + '|unless)\\s*',
keywords: 'unless',
contains: [

@@ -129,0 +130,0 @@ IRB_OBJECT,

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

"homepage": "https://highlightjs.org/",
"version": "9.10.0",
"version": "9.11.0",
"author": {

@@ -959,2 +959,14 @@ "name": "Ivan Sagalaev",

"email": "nene@triin.net"
},
{
"name": "Jordi Petit",
"email": "jordi.petit@gmail.com"
},
{
"name": "Raphaël Parrëe",
"email": "rparree@edc4it.com"
},
{
"name": "Joël Porquet",
"email": "joel@porquet.org"
}

@@ -961,0 +973,0 @@ ],

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