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.3.0 to 8.4.0

lib/languages/aspectj.js

121

lib/highlight.js

@@ -1,3 +0,27 @@

var Highlight = function() {
/*
Syntax highlighting with language autodetection.
https://highlightjs.org/
*/
(function(factory) {
// Setup highlight.js for different environments. First is Node.js or
// CommonJS.
if(typeof exports !== 'undefined') {
factory(exports);
} else {
// Export hljs globally even when using AMD for cases when this script
// is loaded with others that may still expect a global hljs.
window.hljs = factory({});
// Finally register the global hljs with AMD.
if(typeof define === 'function' && define.amd) {
define([], function() {
return window.hljs;
});
}
}
}(function(hljs) {
/* Utility functions */

@@ -592,3 +616,3 @@

function registerLanguage(name, language) {
var lang = languages[name] = language(this);
var lang = languages[name] = language(hljs);
if (lang.aliases) {

@@ -609,74 +633,74 @@ lang.aliases.forEach(function(alias) {aliases[alias] = name;});

this.highlight = highlight;
this.highlightAuto = highlightAuto;
this.fixMarkup = fixMarkup;
this.highlightBlock = highlightBlock;
this.configure = configure;
this.initHighlighting = initHighlighting;
this.initHighlightingOnLoad = initHighlightingOnLoad;
this.registerLanguage = registerLanguage;
this.listLanguages = listLanguages;
this.getLanguage = getLanguage;
this.inherit = inherit;
hljs.highlight = highlight;
hljs.highlightAuto = highlightAuto;
hljs.fixMarkup = fixMarkup;
hljs.highlightBlock = highlightBlock;
hljs.configure = configure;
hljs.initHighlighting = initHighlighting;
hljs.initHighlightingOnLoad = initHighlightingOnLoad;
hljs.registerLanguage = registerLanguage;
hljs.listLanguages = listLanguages;
hljs.getLanguage = getLanguage;
hljs.inherit = inherit;
// Common regexps
this.IDENT_RE = '[a-zA-Z][a-zA-Z0-9_]*';
this.UNDERSCORE_IDENT_RE = '[a-zA-Z_][a-zA-Z0-9_]*';
this.NUMBER_RE = '\\b\\d+(\\.\\d+)?';
this.C_NUMBER_RE = '(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)'; // 0x..., 0..., decimal, float
this.BINARY_NUMBER_RE = '\\b(0b[01]+)'; // 0b...
this.RE_STARTERS_RE = '!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~';
hljs.IDENT_RE = '[a-zA-Z][a-zA-Z0-9_]*';
hljs.UNDERSCORE_IDENT_RE = '[a-zA-Z_][a-zA-Z0-9_]*';
hljs.NUMBER_RE = '\\b\\d+(\\.\\d+)?';
hljs.C_NUMBER_RE = '(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)'; // 0x..., 0..., decimal, float
hljs.BINARY_NUMBER_RE = '\\b(0b[01]+)'; // 0b...
hljs.RE_STARTERS_RE = '!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~';
// Common modes
this.BACKSLASH_ESCAPE = {
hljs.BACKSLASH_ESCAPE = {
begin: '\\\\[\\s\\S]', relevance: 0
};
this.APOS_STRING_MODE = {
hljs.APOS_STRING_MODE = {
className: 'string',
begin: '\'', end: '\'',
illegal: '\\n',
contains: [this.BACKSLASH_ESCAPE]
contains: [hljs.BACKSLASH_ESCAPE]
};
this.QUOTE_STRING_MODE = {
hljs.QUOTE_STRING_MODE = {
className: 'string',
begin: '"', end: '"',
illegal: '\\n',
contains: [this.BACKSLASH_ESCAPE]
contains: [hljs.BACKSLASH_ESCAPE]
};
this.PHRASAL_WORDS_MODE = {
hljs.PHRASAL_WORDS_MODE = {
begin: /\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such)\b/
};
this.C_LINE_COMMENT_MODE = {
hljs.C_LINE_COMMENT_MODE = {
className: 'comment',
begin: '//', end: '$',
contains: [this.PHRASAL_WORDS_MODE]
contains: [hljs.PHRASAL_WORDS_MODE]
};
this.C_BLOCK_COMMENT_MODE = {
hljs.C_BLOCK_COMMENT_MODE = {
className: 'comment',
begin: '/\\*', end: '\\*/',
contains: [this.PHRASAL_WORDS_MODE]
contains: [hljs.PHRASAL_WORDS_MODE]
};
this.HASH_COMMENT_MODE = {
hljs.HASH_COMMENT_MODE = {
className: 'comment',
begin: '#', end: '$',
contains: [this.PHRASAL_WORDS_MODE]
contains: [hljs.PHRASAL_WORDS_MODE]
};
this.NUMBER_MODE = {
hljs.NUMBER_MODE = {
className: 'number',
begin: this.NUMBER_RE,
begin: hljs.NUMBER_RE,
relevance: 0
};
this.C_NUMBER_MODE = {
hljs.C_NUMBER_MODE = {
className: 'number',
begin: this.C_NUMBER_RE,
begin: hljs.C_NUMBER_RE,
relevance: 0
};
this.BINARY_NUMBER_MODE = {
hljs.BINARY_NUMBER_MODE = {
className: 'number',
begin: this.BINARY_NUMBER_RE,
begin: hljs.BINARY_NUMBER_RE,
relevance: 0
};
this.CSS_NUMBER_MODE = {
hljs.CSS_NUMBER_MODE = {
className: 'number',
begin: this.NUMBER_RE + '(' +
begin: hljs.NUMBER_RE + '(' +
'%|em|ex|ch|rem' +

@@ -692,3 +716,3 @@ '|vw|vh|vmin|vmax' +

};
this.REGEXP_MODE = {
hljs.REGEXP_MODE = {
className: 'regexp',

@@ -698,21 +722,22 @@ begin: /\//, end: /\/[gimuy]*/,

contains: [
this.BACKSLASH_ESCAPE,
hljs.BACKSLASH_ESCAPE,
{
begin: /\[/, end: /\]/,
relevance: 0,
contains: [this.BACKSLASH_ESCAPE]
contains: [hljs.BACKSLASH_ESCAPE]
}
]
};
this.TITLE_MODE = {
hljs.TITLE_MODE = {
className: 'title',
begin: this.IDENT_RE,
begin: hljs.IDENT_RE,
relevance: 0
};
this.UNDERSCORE_TITLE_MODE = {
hljs.UNDERSCORE_TITLE_MODE = {
className: 'title',
begin: this.UNDERSCORE_IDENT_RE,
begin: hljs.UNDERSCORE_IDENT_RE,
relevance: 0
};
};
module.exports = Highlight;
return hljs;
}));

@@ -1,3 +0,2 @@

var Highlight = require('./highlight');
var hljs = new Highlight();
var hljs = require('./highlight');

@@ -10,2 +9,3 @@ hljs.registerLanguage('1c', require('./languages/1c'));

hljs.registerLanguage('asciidoc', require('./languages/asciidoc'));
hljs.registerLanguage('aspectj', require('./languages/aspectj'));
hljs.registerLanguage('autohotkey', require('./languages/autohotkey'));

@@ -18,2 +18,3 @@ hljs.registerLanguage('avrasm', require('./languages/avrasm'));

hljs.registerLanguage('clojure', require('./languages/clojure'));
hljs.registerLanguage('clojure-repl', require('./languages/clojure-repl'));
hljs.registerLanguage('cmake', require('./languages/cmake'));

@@ -64,2 +65,3 @@ hljs.registerLanguage('coffeescript', require('./languages/coffeescript'));

hljs.registerLanguage('mel', require('./languages/mel'));
hljs.registerLanguage('mercury', require('./languages/mercury'));
hljs.registerLanguage('mizar', require('./languages/mizar'));

@@ -86,2 +88,3 @@ hljs.registerLanguage('monkey', require('./languages/monkey'));

hljs.registerLanguage('rib', require('./languages/rib'));
hljs.registerLanguage('roboconf', require('./languages/roboconf'));
hljs.registerLanguage('rsl', require('./languages/rsl'));

@@ -94,4 +97,8 @@ hljs.registerLanguage('ruleslanguage', require('./languages/ruleslanguage'));

hljs.registerLanguage('scss', require('./languages/scss'));
hljs.registerLanguage('smali', require('./languages/smali'));
hljs.registerLanguage('smalltalk', require('./languages/smalltalk'));
hljs.registerLanguage('sml', require('./languages/sml'));
hljs.registerLanguage('sql', require('./languages/sql'));
hljs.registerLanguage('stata', require('./languages/stata'));
hljs.registerLanguage('step21', require('./languages/step21'));
hljs.registerLanguage('stylus', require('./languages/stylus'));

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

hljs.registerLanguage('vbscript-html', require('./languages/vbscript-html'));
hljs.registerLanguage('verilog', require('./languages/verilog'));
hljs.registerLanguage('vhdl', require('./languages/vhdl'));

@@ -110,0 +118,0 @@ hljs.registerLanguage('vim', require('./languages/vim'));

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

},
// inline double smart quotes
// inline smart quotes
{
className: 'smartquote',
begin: "``.+?''",
relevance: 10
variants: [
{begin: "``.+?''"},
{begin: "`.+?'"}
]
},
// inline single smart quotes
{
className: 'smartquote',
begin: "`.+?'",
relevance: 10
},
// inline code snippets (TODO should get same treatment as strong and emphasis)

@@ -146,0 +142,0 @@ {

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

keyword:
'if then else elif fi for break continue while in do done exit return set '+
'declare case esac export exec function',
'if then else elif fi for while in do done case esac function',
literal:
'true false',
built_in:
'printf echo read cd pwd pushd popd dirs let eval unset typeset readonly '+
'getopts source shopt caller type hash bind help sudo',
// Shell built-ins
// http://www.gnu.org/software/bash/manual/html_node/Shell-Builtin-Commands.html
'break cd continue eval exec exit export getopts hash pwd readonly return shift test times ' +
'trap umask unset ' +
// Bash built-ins
'alias bind builtin caller command declare echo enable help let local logout mapfile printf ' +
'read readarray source type typeset ulimit unalias ' +
// Shell modifiers
'set shopt ' +
// Zsh built-ins
'autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles ' +
'compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate ' +
'fc fg float functions getcap getln history integer jobs kill limit log noglob popd print ' +
'pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit ' +
'unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof ' +
'zpty zregexparse zsocket zstyle ztcp',
operator:

@@ -41,0 +54,0 @@ '-ne -eq -lt -gt -f -d -e -s -l -a' // relevance booster

@@ -52,2 +52,6 @@ module.exports = function(hljs) {

};
var LITERAL = {
className: 'literal',
begin: /\b(true|false|nil)\b/
}
var COLLECTION = {

@@ -76,3 +80,2 @@ className: 'collection',

endsWithParent: true,
keywords: {literal: 'true false nil'},
relevance: 0

@@ -86,6 +89,7 @@ };

};
var DEFAULT_CONTAINS = [LIST, STRING, HINT, HINT_COL, COMMENT, KEY, COLLECTION, NUMBER, LITERAL, SYMBOL];
LIST.contains = [{className: 'comment', begin: 'comment'}, NAME, BODY];
BODY.contains = [LIST, STRING, HINT, HINT_COL, COMMENT, KEY, COLLECTION, NUMBER, SYMBOL];
COLLECTION.contains = [LIST, STRING, HINT, COMMENT, KEY, COLLECTION, NUMBER, SYMBOL];
BODY.contains = DEFAULT_CONTAINS;
COLLECTION.contains = DEFAULT_CONTAINS;

@@ -95,12 +99,4 @@ return {

illegal: /\S/,
contains: [
COMMENT,
LIST,
{
className: 'prompt',
begin: /^=> /,
starts: {end: /\n\n|\Z/} // eat up prompt output to not interfere with the illegal
}
]
contains: [LIST, STRING, HINT, HINT_COL, COMMENT, KEY, COLLECTION, NUMBER, LITERAL]
}
};

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

'dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace ' +
'unsigned long throw volatile static protected bool template mutable if public friend ' +
'do return goto auto void enum else break new extern using true class asm case typeid ' +
'unsigned long volatile static protected bool template mutable if public friend ' +
'do goto auto void enum else break extern using true class asm case typeid ' +
'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 ' +
'noexcept nullptr static_assert thread_local restrict _Bool complex _Complex _Imaginary',
'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_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',
built_in: 'std string cin cout cerr clog stringstream istringstream ostringstream ' +

@@ -60,2 +70,32 @@ 'auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set ' +

begin: hljs.IDENT_RE + '::'
},
{
// Expression keywords prevent 'keyword Name(...)' from being
// recognized as a function definition
beginKeywords: 'new throw return',
relevance: 0
},
{
className: 'function',
begin: '(' + hljs.IDENT_RE + '\\s+)+' + hljs.IDENT_RE + '\\s*\\(', returnBegin: true, end: /[{;=]/,
excludeEnd: true,
keywords: CPP_KEYWORDS,
contains: [
{
begin: hljs.IDENT_RE + '\\s*\\(', returnBegin: true,
contains: [hljs.TITLE_MODE],
relevance: 0
},
{
className: 'params',
begin: /\(/, end: /\)/,
keywords: CPP_KEYWORDS,
relevance: 0,
contains: [
hljs.C_BLOCK_COMMENT_MODE
]
},
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE
]
}

@@ -62,0 +102,0 @@ ]

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

'default delegate do double else enum event explicit extern false finally fixed float ' +
'for foreach goto if implicit in int interface internal is lock long new null ' +
'object operator out override params private protected public readonly ref return sbyte ' +
'sealed short sizeof stackalloc static string struct switch this throw true try typeof ' +
'uint ulong unchecked unsafe ushort using virtual volatile void while async await ' +
'for foreach goto if implicit in int interface internal is lock long null ' +
'object operator out override params private protected public readonly ref sbyte ' +
'sealed short sizeof stackalloc static string struct switch this true try typeof ' +
'uint ulong unchecked unsafe ushort using virtual volatile void while async ' +
'protected public private internal ' +

@@ -66,4 +66,5 @@ // Contextual keywords.

{
// this prevents 'new Name(...)' from being recognized as a function definition
beginKeywords: 'new', end: /\s/,
// Expression keywords prevent 'keyword Name(...)' from being
// recognized as a function definition
beginKeywords: 'new return throw await',
relevance: 0

@@ -79,3 +80,4 @@ },

begin: hljs.IDENT_RE + '\\s*\\(', returnBegin: true,
contains: [hljs.TITLE_MODE]
contains: [hljs.TITLE_MODE],
relevance: 0
},

@@ -86,2 +88,3 @@ {

keywords: KEYWORDS,
relevance: 0,
contains: [

@@ -88,0 +91,0 @@ hljs.APOS_STRING_MODE,

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

className: 'function',
begin: IDENT_RE + '\\(',
begin: IDENT_RE + '\\(',
returnBegin: true,

@@ -8,0 +8,0 @@ excludeEnd: true,

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

keywords: KEYWORDS,
illegal: /("|\$[G-Zg-z]|\/\*|<\/)/,
illegal: /"|\$[G-Zg-z]|\/\*|<\/|\|/,
contains: [

@@ -52,0 +52,0 @@ COMMENT, hljs.C_LINE_COMMENT_MODE,

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

{
className: 'template_comment',
className: 'comment',
begin: /\{%\s*comment\s*%}/, end: /\{%\s*endcomment\s*%}/
},
{
className: 'template_comment',
className: 'comment',
begin: /\{#/, end: /#}/

@@ -33,0 +33,0 @@ },

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

begin: /@?rem\b/, end: /$/,
relevance: 10
relevance: 10
};
var LABEL = {
className: 'label',
begin: '^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)',
relevance: 0
className: 'label',
begin: '^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)',
relevance: 0
};

@@ -13,0 +13,0 @@ return {

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

className: 'number',
begin: '[^a-zA-Z_0-9](\\-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s)(\\+|\\-)?\\d+)?',
begin: hljs.C_NUMBER_RE + '[dflsi]?',
relevance: 0

@@ -35,0 +35,0 @@ },

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

},
contains: [
contains: [
hljs.C_LINE_COMMENT_MODE,

@@ -27,0 +27,0 @@ hljs.C_BLOCK_COMMENT_MODE,

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

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

@@ -25,0 +26,0 @@ ]

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

keyword: 'break callback case cast catch class continue default do dynamic else enum extends extern ' +
'for function here if implements import in inline interface never new override package private ' +
'public return static super switch this throw trace try typedef untyped using var while',
'for function here if implements import in inline interface never new override package private ' +
'public return static super switch this throw trace try typedef untyped using var while',
literal: 'true false null'

@@ -13,0 +13,0 @@ },

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

'false synchronized int abstract float private char boolean static null if const ' +
'for true while long throw strictfp finally protected import native final return void ' +
'enum else break transient new catch instanceof byte super volatile case assert short ' +
'for true while long strictfp finally protected import native final void ' +
'enum else break transient catch instanceof byte super volatile case assert short ' +
'package default double public try this switch continue throws protected public private';
// 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_MODE = {
className: 'number',
begin: JAVA_NUMBER_RE,
relevance: 0
};
return {

@@ -37,4 +46,5 @@ aliases: ['jsp'],

{
// this prevents 'new Name(...), or throw ...' from being recognized as a function definition
beginKeywords: 'new throw', end: /\s/,
// Expression keywords prevent 'keyword Name(...)' from being
// recognized as a function definition
beginKeywords: 'new throw return',
relevance: 0

@@ -50,2 +60,3 @@ },

begin: hljs.UNDERSCORE_IDENT_RE + '\\s*\\(', returnBegin: true,
relevance: 0,
contains: [hljs.UNDERSCORE_TITLE_MODE]

@@ -57,2 +68,3 @@ },

keywords: KEYWORDS,
relevance: 0,
contains: [

@@ -69,3 +81,3 @@ hljs.APOS_STRING_MODE,

},
hljs.C_NUMBER_MODE,
JAVA_NUMBER_MODE,
{

@@ -72,0 +84,0 @@ className: 'annotation', begin: '@[A-Za-z]+'

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

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

@@ -27,0 +30,0 @@ hljs.APOS_STRING_MODE,

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

'array date decimal duration integer map pair string tag xml null ' +
'bytes list queue set stack staticarray tie local var variable ' +
'global data self inherited',
'boolean bytes keyword list locale queue set stack staticarray ' +
'local var variable global data self inherited',
keyword:

@@ -65,3 +65,3 @@ 'error_code error_msg error_pop error_push error_reset cache ' +

hljs.C_BLOCK_COMMENT_MODE,
hljs.inherit(hljs.C_NUMBER_MODE, {begin: hljs.C_NUMBER_RE + '|-?(infinity|nan)\\b'}),
hljs.inherit(hljs.C_NUMBER_MODE, {begin: hljs.C_NUMBER_RE + '|(-?infinity|nan)\\b'}),
hljs.inherit(hljs.APOS_STRING_MODE, {illegal: null}),

@@ -117,3 +117,3 @@ hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}),

className: 'built_in',
begin: '\\.\\.?',
begin: '\\.\\.?\\s*',
relevance: 0,

@@ -165,3 +165,3 @@ contains: [LASSO_DATAMEMBER]

className: 'markup',
end: LASSO_ANGLE_RE,
end: '\\[noprocess\\]|' + LASSO_ANGLE_RE,
returnEnd: true,

@@ -168,0 +168,0 @@ contains: [HTML_COMMENT]

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

var RULE_MODE = {
className: 'attribute', begin: INTERP_IDENT_RE, relevance: 0,
className: 'attribute',
begin: INTERP_IDENT_RE, end: ':', excludeEnd: true,
contains: [hljs.C_LINE_COMMENT_MODE, hljs.C_BLOCK_COMMENT_MODE],
illegal: /\S/,
starts: {end: '[;}]', returnEnd: true, contains: VALUE, illegal: '[<=$]'}

@@ -95,9 +98,3 @@ };

}, {
begin: '(?=' + INTERP_IDENT_RE + ')(' + [
'//.*', // line comment
'/\\*(?:[^*]|\\*+[^*/])*\\*+/', // block comment
'\\[[^\\]]*\\]', // attribute selector (it may contain strings we need to skip too)
'@{.*?}', // variable interpolation
'[^;}\'"`]', // non-selector terminals
].join('|') + ')*?[^@\'"`]{', // at last
begin: INTERP_IDENT_RE + '[^;]*{',
end: '{'

@@ -104,0 +101,0 @@ }],

module.exports = function(hljs) {
var LISP_IDENT_RE = '[a-zA-Z_\\-\\+\\*\\/\\<\\=\\>\\&\\#][a-zA-Z0-9_\\-\\+\\*\\/\\<\\=\\>\\&\\#!]*';
var MEC_RE = '\\|[^]*?\\|';
var LISP_SIMPLE_NUMBER_RE = '(\\-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s)(\\+|\\-)?\\d+)?';

@@ -35,2 +36,5 @@ var SHEBANG = {

};
var MEC = {
begin: MEC_RE
};
var QUOTED_LIST = {

@@ -50,2 +54,5 @@ begin: '\\(', end: '\\)',

keywords: 'quote'
},
{
begin: '\'' + MEC_RE
}

@@ -66,4 +73,13 @@ ]

};
LIST.contains = [{className: 'keyword', begin: LISP_IDENT_RE}, BODY];
BODY.contains = [QUOTED, QUOTED_ATOM, LIST, LITERAL, NUMBER, STRING, COMMENT, VARIABLE, KEYWORD];
LIST.contains = [
{
className: 'keyword',
variants: [
{begin: LISP_IDENT_RE},
{begin: MEC_RE}
]
},
BODY
];
BODY.contains = [QUOTED, QUOTED_ATOM, LIST, LITERAL, NUMBER, STRING, COMMENT, VARIABLE, KEYWORD, MEC];

@@ -70,0 +86,0 @@ return {

module.exports = function(hljs) {
return {
keywords: [
"environ vocabularies notations constructors definitions registrations theorems schemes requirements",
"begin end definition registration cluster existence pred func defpred deffunc theorem proof",
"let take assume then thus hence ex for st holds consider reconsider such that and in provided of as from",
"be being by means equals implies iff redefine define now not or attr is mode suppose per cases set",
"thesis contradiction scheme reserve struct",
"correctness compatibility coherence symmetry assymetry reflexivity irreflexivity",
"connectedness uniqueness commutativity idempotence involutiveness projectivity"
].join(" "),
keywords:
'environ vocabularies notations constructors definitions ' +
'registrations theorems schemes requirements begin end definition ' +
'registration cluster existence pred func defpred deffunc theorem ' +
'proof let take assume then thus hence ex for st holds consider ' +
'reconsider such that and in provided of as from be being by means ' +
'equals implies iff redefine define now not or attr is mode ' +
'suppose per cases set thesis contradiction scheme reserve struct ' +
'correctness compatibility coherence symmetry assymetry ' +
'reflexivity irreflexivity connectedness uniqueness commutativity ' +
'idempotence involutiveness projectivity',
contains: [
{
className: "comment",
begin: "::", end: "$"
className: 'comment',
begin: '::', end: '$'
}

@@ -17,0 +19,0 @@ ]

module.exports = function(hljs) {
var NUMBER = {
className: 'number', relevance: 0,
variants: [
{
className: 'number',
begin: '[$][a-fA-F0-9]+'

@@ -7,0 +7,0 @@ },

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

ATTRS
];
];
ANTIQUOTE.contains = EXPRESSIONS;

@@ -45,0 +45,0 @@ return {

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

literal:
'false true FALSE TRUE nil YES NO NULL',
'false true FALSE TRUE nil YES NO NULL',
built_in:

@@ -17,0 +17,0 @@ 'NSString NSData NSDictionary CGRect CGPoint UIButton UILabel UITextView UIWebView MKMapView ' +

module.exports = function(hljs) {
/* missing support for heredoc-like string (OCaml 4.0.2+) */
return {

@@ -7,15 +8,22 @@ aliases: ['ml'],

'and as assert asr begin class constraint do done downto else end ' +
'exception external false for fun function functor if in include ' +
'inherit initializer land lazy let lor lsl lsr lxor match method ' +
'mod module mutable new object of open or private rec ref sig struct ' +
'then to true try type val virtual when while with parser value',
'exception external for fun function functor if in include ' +
'inherit! inherit initializer land lazy let lor lsl lsr lxor match method!|10 method ' +
'mod module mutable new object of open! open or private rec sig struct ' +
'then to try type val! val virtual when while with ' +
/* camlp4 */
'parser value',
built_in:
'bool char float int list unit array exn option int32 int64 nativeint ' +
'format4 format6 lazy_t in_channel out_channel string'
/* built-in types */
'array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 string unit ' +
/* (some) types in Pervasives */
'in_channel out_channel ref',
literal:
'true false',
},
illegal: /\/\//,
illegal: /\/\/|>>/,
lexemes: '[a-z_]\\w*!?',
contains: [
{
className: 'string',
begin: '"""', end: '"""'
className: 'literal',
begin: '\\[(\\|\\|)?\\]|\\(\\)'
},

@@ -25,21 +33,37 @@ {

begin: '\\(\\*', end: '\\*\\)',
contains: ['self']
contains: ['self'],
},
{ /* type variable */
className: 'symbol',
begin: '\'[A-Za-z_](?!\')[\\w\']*',
/* the grammar is ambiguous on how 'a'b should be interpreted but not the compiler */
},
{ /* polymorphic variant */
className: 'tag',
begin: '`[A-Z][\\w\']*',
},
{ /* module or constructor */
className: 'type',
begin: '\\b[A-Z][\\w\']*',
relevance: 0
},
{ /* don't color identifiers, but safely catch all identifiers with '*/
begin: '[a-z_]\\w*\'[\\w\']*'
},
hljs.inherit(hljs.APOS_STRING_MODE, {className: 'char', relevance: 0}),
hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}),
{
className: 'class',
beginKeywords: 'type', end: '\\(|=|$', excludeEnd: true,
contains: [
hljs.UNDERSCORE_TITLE_MODE
]
className: 'number',
begin:
'\\b(0[xX][a-fA-F0-9_]+[Lln]?|' +
'0[oO][0-7_]+[Lln]?|' +
'0[bB][01_]+[Lln]?|' +
'[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)',
relevance: 0
},
{
className: 'annotation',
begin: '\\[<', end: '>\\]'
},
hljs.C_BLOCK_COMMENT_MODE,
hljs.inherit(hljs.APOS_STRING_MODE, {illegal: null}),
hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}),
hljs.C_NUMBER_MODE
begin: /[-=]>/ // relevance booster
}
]
}
};

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

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

};
var FUNC_CLASS_PROTO = {
end: /:/,
illegal: /[${=;\n]/,
contains: [hljs.UNDERSCORE_TITLE_MODE, PARAMS]
};
return {

@@ -73,5 +67,12 @@ aliases: ['py', 'gyp'],

hljs.HASH_COMMENT_MODE,
hljs.inherit(FUNC_CLASS_PROTO, {className: 'function', beginKeywords: 'def', relevance: 10}),
hljs.inherit(FUNC_CLASS_PROTO, {className: 'class', beginKeywords: 'class'}),
{
variants: [
{className: 'function', beginKeywords: 'def', relevance: 10},
{className: 'class', beginKeywords: 'class'}
],
end: /:/,
illegal: /[${=;\n]/,
contains: [hljs.UNDERSCORE_TITLE_MODE, PARAMS]
},
{
className: 'decorator',

@@ -78,0 +79,0 @@ begin: /@/, end: /$/

module.exports = function(hljs) {
var Q_KEYWORDS = {
keyword:
keyword:
'do while select delete by update from',
constant:
'0b 1b',
built_in:
built_in:
'neg not null string reciprocal floor ceiling signum mod xbar xlog and or each scan over prior mmu lsq inv md5 ltime gtime count first var dev med cov cor all any rand sums prds mins maxs fills deltas ratios avgs differ prev next rank reverse iasc idesc asc desc msum mcount mavg mdev xrank mmin mmax xprev rotate distinct group where flip type key til get value attr cut set upsert raze union inter except cross sv vs sublist enlist read0 read1 hopen hclose hdel hsym hcount peach system ltrim rtrim trim lower upper ssr view tables views cols xcols keys xkey xcol xasc xdesc fkeys meta lj aj aj0 ij pj asof uj ww wj wj1 fby xgroup ungroup ej save load rsave rload show csv parse eval min max avg wavg wsum sin cos tan sum',
typename:
'`float `double int `timestamp `timespan `datetime `time `boolean `symbol `char `byte `short `long `real `month `date `minute `second `guid'
typename:
'`float `double int `timestamp `timespan `datetime `time `boolean `symbol `char `byte `short `long `real `month `date `minute `second `guid'
};
return {
aliases:['k', 'kdb'],
keywords: Q_KEYWORDS,
lexemes: /\b(`?)[A-Za-z0-9_]+\b/,
contains: [
keywords: Q_KEYWORDS,
lexemes: /\b(`?)[A-Za-z0-9_]+\b/,
contains: [
hljs.C_LINE_COMMENT_MODE,

@@ -18,0 +18,0 @@ hljs.QUOTE_STRING_MODE,

@@ -145,2 +145,6 @@ module.exports = function(hljs) {

var SIMPLE_PROMPT = "[>?]>";
var DEFAULT_PROMPT = "[\\w#]+\\(\\w+\\):\\d+:\\d+>";
var RVM_PROMPT = "(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>";
var IRB_DEFAULT = [

@@ -156,3 +160,3 @@ {

className: 'prompt',
begin: /^\S[^=>\n]*>+/,
begin: '^('+SIMPLE_PROMPT+"|"+DEFAULT_PROMPT+'|'+RVM_PROMPT+')',
starts: {

@@ -159,0 +163,0 @@ end: '$', contains: RUBY_DEFAULT_CONTAINS

module.exports = function(hljs) {
var BLOCK_COMMENT = hljs.inherit(hljs.C_BLOCK_COMMENT_MODE);
BLOCK_COMMENT.contains.push('self');
return {

@@ -16,3 +18,3 @@ aliases: ['rs'],

'assert! assert_eq! bitflags! bytes! cfg! col! concat! concat_idents! ' +
'debug_assert! debug_assert_eq! env! fail! file! format! format_args! ' +
'debug_assert! debug_assert_eq! env! panic! file! format! format_args! ' +
'include_bin! include_str! line! local_data_key! module_path! ' +

@@ -26,3 +28,3 @@ 'option_env! print! println! select! stringify! try! unimplemented! ' +

hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
BLOCK_COMMENT,
hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}),

@@ -42,3 +44,3 @@ {

className: 'number',
begin: '\\b(0[xb][A-Za-z0-9_]+|[0-9_]+(\\.[0-9_]+)?([uif](8|16|32|64)?)?)',
begin: /\b(0[xb][A-Za-z0-9_]+|[0-9_]+(\.[0-9_]+)?([eE][+-]?[0-9_]+)?)([uif](8|16|32|64)?)?/,
relevance: 0

@@ -45,0 +47,0 @@ },

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

className: 'function',
begin: IDENT_RE + '\\(',
begin: IDENT_RE + '\\(',
returnBegin: true,

@@ -12,0 +12,0 @@ excludeEnd: true,

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

'\\*\\s', // markdown
'===\\s' // markdown
'===\\s', // markdown
'\\|'
];

@@ -340,0 +341,0 @@

module.exports = function(hljs) {
var PARAMS = {

@@ -8,3 +7,2 @@ className: 'params',

var FUNCTION_NAMES = 'attribute block constant cycle date dump include ' +

@@ -35,3 +33,7 @@ 'max min parent random range source template_from_string';

var TAGS = 'autoescape block do embed extends filter flush for ' +
'if import include macro sandbox set spaceless use verbatim';
TAGS = TAGS + ' ' + TAGS.split(' ').map(function(t){return 'end' + t}).join(' ');
return {

@@ -43,14 +45,10 @@ aliases: ['craftcms'],

{
className: 'template_comment',
className: 'comment',
begin: /\{#/, end: /#}/
},
{
className: 'template_tag',
begin: /\{%/, end: /%}/,
keywords:
'autoescape block do embed extends filter flush for ' +
'if import include maro sandbox set spaceless use ' +
'verbatim',
contains: [FILTER,FUNCTIONS]
keywords: TAGS,
contains: [FILTER, FUNCTIONS]
},

@@ -60,3 +58,3 @@ {

begin: /\{\{/, end: /}}/,
contains: [FILTER,FUNCTIONS]
contains: [FILTER, FUNCTIONS]
}

@@ -63,0 +61,0 @@ ]

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

"homepage": "https://highlightjs.org/",
"version": "8.3.0",
"version": "8.4.0",
"author": {

@@ -547,2 +547,46 @@ "name": "Ivan Sagalaev",

"email": "kassioborgesm@gmail.com"
},
{
"name": "Cedric Sohrauer",
"email": "sohrauer@googlemail.com"
},
{
"name": "Mickaël Delahaye",
"email": "mickael.delahaye@gmail.com"
},
{
"name": "Hakan Özler",
"email": "ozler.hakan@gmail.com"
},
{
"name": "Trey Shugart",
"email": "treshugart@gmail.com"
},
{
"name": "Vincent Zurczak",
"email": "vzurczak@linagora.com"
},
{
"name": "Adam Joseph Cook",
"email": "adam.joseph.cook@gmail.com"
},
{
"name": "Edwin Dalorzo",
"email": "edwin@dalorzo.org"
},
{
"name": "mucaho",
"email": "mkucko@gmail.com"
},
{
"name": "Dennis Titze",
"email": "dennis.titze@gmail.com"
},
{
"name": "Jon Evans",
"email": "jon@craftyjon.com"
},
{
"name": "Brian Quistorff",
"email": "bquistorff@gmail.com"
}

@@ -576,7 +620,7 @@ ],

"glob": "^4.0.5",
"jsdom": "^0.11.1",
"jsdom": "^1.0.3",
"lodash": "^2.4.1",
"mocha": "^1.21.4",
"mocha": "^2.0.1",
"should": "^4.0.4"
}
}

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