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.1.0 to 9.2.0

lib/languages/csp.js

70

lib/highlight.js

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

// Find the global object for export to both the browser and web workers.
var globalObject = typeof window == 'object' && window ||
typeof self == 'object' && self;
// Setup highlight.js for different environments. First is Node.js or

@@ -13,11 +17,11 @@ // CommonJS.

factory(exports);
} else {
} else if(globalObject) {
// Export hljs globally even when using AMD for cases when this script
// is loaded with others that may still expect a global hljs.
self.hljs = factory({});
globalObject.hljs = factory({});
// Finally register the global hljs with AMD.
if(typeof define === 'function' && define.amd) {
define('hljs', [], function() {
return self.hljs;
define([], function() {
return globalObject.hljs;
});

@@ -54,3 +58,3 @@ }

// language-* takes precedence over non-prefixed class names
// language-* takes precedence over non-prefixed class names.
match = (/\blang(?:uage)?-([\w-]+)\b/i).exec(classes);

@@ -375,17 +379,8 @@ if (match) {

function processBuffer() {
return top.subLanguage !== undefined ? processSubLanguage() : processKeywords();
result += (top.subLanguage !== undefined ? processSubLanguage() : processKeywords());
mode_buffer = '';
}
function startNewMode(mode, lexeme) {
var markup = mode.className? buildSpan(mode.className, '', true): '';
if (mode.returnBegin) {
result += markup;
mode_buffer = '';
} else if (mode.excludeBegin) {
result += escape(lexeme) + markup;
mode_buffer = '';
} else {
result += markup;
mode_buffer = lexeme;
}
result += mode.className? buildSpan(mode.className, '', true): '';
top = Object.create(mode, {parent: {value: top}});

@@ -397,4 +392,5 @@ }

mode_buffer += buffer;
if (lexeme === undefined) {
result += processBuffer();
processBuffer();
return 0;

@@ -405,3 +401,13 @@ }

if (new_mode) {
result += processBuffer();
if (new_mode.skip) {
mode_buffer += lexeme;
} else {
if (new_mode.excludeBegin) {
mode_buffer += lexeme;
}
processBuffer();
if (!new_mode.returnBegin && !new_mode.excludeBegin) {
mode_buffer = lexeme;
}
}
startNewMode(new_mode, lexeme);

@@ -414,6 +420,13 @@ return new_mode.returnBegin ? 0 : lexeme.length;

var origin = top;
if (!(origin.returnEnd || origin.excludeEnd)) {
if (origin.skip) {
mode_buffer += lexeme;
} else {
if (!(origin.returnEnd || origin.excludeEnd)) {
mode_buffer += lexeme;
}
processBuffer();
if (origin.excludeEnd) {
mode_buffer = lexeme;
}
}
result += processBuffer();
do {

@@ -423,9 +436,7 @@ if (top.className) {

}
relevance += top.relevance;
if (!top.skip) {
relevance += top.relevance;
}
top = top.parent;
} while (top != end_mode.parent);
if (origin.excludeEnd) {
result += escape(lexeme);
}
mode_buffer = '';
if (end_mode.starts) {

@@ -620,3 +631,3 @@ startNewMode(end_mode.starts, '');

/*
Updates highlight.js global options with values passed in the form of an object
Updates highlight.js global options with values passed in the form of an object.
*/

@@ -778,4 +789,9 @@ function configure(user_options) {

};
hljs.METHOD_GUARD = {
// excludes method names from keyword processing
begin: '\\.\\s*' + hljs.UNDERSCORE_IDENT_RE,
relevance: 0
};
return hljs;
}));

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

hljs.registerLanguage('cs', require('./languages/cs'));
hljs.registerLanguage('csp', require('./languages/csp'));
hljs.registerLanguage('css', require('./languages/css'));

@@ -68,2 +69,3 @@ hljs.registerLanguage('d', require('./languages/d'));

hljs.registerLanguage('hsp', require('./languages/hsp'));
hljs.registerLanguage('htmlbars', require('./languages/htmlbars'));
hljs.registerLanguage('http', require('./languages/http'));

@@ -87,2 +89,3 @@ hljs.registerLanguage('inform7', require('./languages/inform7'));

hljs.registerLanguage('matlab', require('./languages/matlab'));
hljs.registerLanguage('maxima', require('./languages/maxima'));
hljs.registerLanguage('mel', require('./languages/mel'));

@@ -114,2 +117,3 @@ hljs.registerLanguage('mercury', require('./languages/mercury'));

hljs.registerLanguage('q', require('./languages/q'));
hljs.registerLanguage('qml', require('./languages/qml'));
hljs.registerLanguage('r', require('./languages/r'));

@@ -116,0 +120,0 @@ hljs.registerLanguage('rib', require('./languages/rib'));

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

]
}
},
hljs.METHOD_GUARD
],

@@ -71,0 +72,0 @@ illegal: /#/

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

keywords: {
function: 'setup loop while catch for if do goto try switch case else default break continue return',
keyword: 'boolean byte word string String array ' +

@@ -64,80 +63,83 @@ // CPP keywords

'atomic_ullong',
built_in: 'KeyboardController MouseController SoftwareSerial ' +
'EthernetServer EthernetClient LiquidCrystal ' +
'RobotControl GSMVoiceCall EthernetUDP EsploraTFT ' +
'HttpClient RobotMotor WiFiClient GSMScanner ' +
'FileSystem Scheduler GSMServer YunClient YunServer ' +
'IPAddress GSMClient GSMModem Keyboard Ethernet ' +
'Console GSMBand Esplora Stepper Process ' +
'WiFiUDP GSM_SMS Mailbox USBHost Firmata PImage ' +
'Client Server GSMPIN FileIO Bridge Serial ' +
'EEPROM Stream Mouse Audio Servo File Task ' +
'GPRS WiFi Wire TFT GSM SPI SD ' +
'runShellCommandAsynchronously analogWriteResolution ' +
'retrieveCallingNumber printFirmwareVersion ' +
'analogReadResolution sendDigitalPortPair ' +
'noListenOnLocalhost readJoystickButton setFirmwareVersion ' +
'readJoystickSwitch scrollDisplayRight getVoiceCallStatus ' +
'scrollDisplayLeft writeMicroseconds delayMicroseconds ' +
'beginTransmission getSignalStrength runAsynchronously ' +
'getAsynchronously listenOnLocalhost getCurrentCarrier ' +
'readAccelerometer messageAvailable sendDigitalPorts ' +
'lineFollowConfig countryNameWrite runShellCommand ' +
'readStringUntil rewindDirectory readTemperature ' +
'setClockDivider readLightSensor endTransmission ' +
'analogReference detachInterrupt countryNameRead ' +
'attachInterrupt encryptionType readBytesUntil ' +
'robotNameWrite readMicrophone robotNameRead cityNameWrite ' +
'userNameWrite readJoystickY readJoystickX mouseReleased ' +
'openNextFile scanNetworks noInterrupts digitalWrite ' +
'beginSpeaker mousePressed isActionDone mouseDragged ' +
'displayLogos noAutoscroll addParameter remoteNumber ' +
'getModifiers keyboardRead userNameRead waitContinue ' +
'processInput parseCommand printVersion readNetworks ' +
'writeMessage blinkVersion cityNameRead readMessage ' +
'setDataMode parsePacket isListening setBitOrder ' +
'beginPacket isDirectory motorsWrite drawCompass ' +
'digitalRead clearScreen serialEvent rightToLeft ' +
'setTextSize leftToRight requestFrom keyReleased ' +
'compassRead analogWrite interrupts WiFiServer ' +
'disconnect playMelody parseFloat autoscroll ' +
'getPINUsed setPINUsed setTimeout sendAnalog ' +
'readSlider analogRead beginWrite createChar ' +
'motorsStop keyPressed tempoWrite readButton ' +
'subnetMask debugPrint macAddress writeGreen ' +
'randomSeed attachGPRS readString sendString ' +
'remotePort releaseAll mouseMoved background ' +
'getXChange getYChange answerCall getResult ' +
'voiceCall endPacket constrain getSocket writeJSON ' +
'getButton available connected findUntil readBytes ' +
'exitValue readGreen writeBlue startLoop IPAddress ' +
'isPressed sendSysex pauseMode gatewayIP setCursor ' +
'getOemKey tuneWrite noDisplay loadImage switchPIN ' +
'onRequest onReceive changePIN playFile noBuffer ' +
'parseInt overflow checkPIN knobRead beginTFT ' +
'bitClear updateIR bitWrite position writeRGB ' +
'highByte writeRed setSpeed readBlue noStroke ' +
'remoteIP transfer shutdown hangCall beginSMS ' +
'endWrite attached maintain noCursor checkReg ' +
'checkPUK shiftOut isValid shiftIn pulseIn ' +
'connect println localIP pinMode getIMEI ' +
'display noBlink process getBand running beginSD ' +
'drawBMP lowByte setBand release bitRead prepare ' +
'pointTo readRed setMode noFill remove listen ' +
'stroke detach attach noTone exists buffer ' +
'height bitSet circle config cursor random ' +
'IRread setDNS endSMS getKey micros ' +
'millis begin print write ready flush width ' +
'isPIN blink clear press mkdir rmdir close ' +
'point yield image BSSID click delay ' +
'read text move peek beep rect line open ' +
'seek fill size turn stop home find ' +
'step tone sqrt RSSI SSID ' +
'end bit tan cos sin pow map abs max ' +
built_in:
'setup loop while catch for if do goto try switch case else ' +
'default break continue return ' +
'KeyboardController MouseController SoftwareSerial ' +
'EthernetServer EthernetClient LiquidCrystal ' +
'RobotControl GSMVoiceCall EthernetUDP EsploraTFT ' +
'HttpClient RobotMotor WiFiClient GSMScanner ' +
'FileSystem Scheduler GSMServer YunClient YunServer ' +
'IPAddress GSMClient GSMModem Keyboard Ethernet ' +
'Console GSMBand Esplora Stepper Process ' +
'WiFiUDP GSM_SMS Mailbox USBHost Firmata PImage ' +
'Client Server GSMPIN FileIO Bridge Serial ' +
'EEPROM Stream Mouse Audio Servo File Task ' +
'GPRS WiFi Wire TFT GSM SPI SD ' +
'runShellCommandAsynchronously analogWriteResolution ' +
'retrieveCallingNumber printFirmwareVersion ' +
'analogReadResolution sendDigitalPortPair ' +
'noListenOnLocalhost readJoystickButton setFirmwareVersion ' +
'readJoystickSwitch scrollDisplayRight getVoiceCallStatus ' +
'scrollDisplayLeft writeMicroseconds delayMicroseconds ' +
'beginTransmission getSignalStrength runAsynchronously ' +
'getAsynchronously listenOnLocalhost getCurrentCarrier ' +
'readAccelerometer messageAvailable sendDigitalPorts ' +
'lineFollowConfig countryNameWrite runShellCommand ' +
'readStringUntil rewindDirectory readTemperature ' +
'setClockDivider readLightSensor endTransmission ' +
'analogReference detachInterrupt countryNameRead ' +
'attachInterrupt encryptionType readBytesUntil ' +
'robotNameWrite readMicrophone robotNameRead cityNameWrite ' +
'userNameWrite readJoystickY readJoystickX mouseReleased ' +
'openNextFile scanNetworks noInterrupts digitalWrite ' +
'beginSpeaker mousePressed isActionDone mouseDragged ' +
'displayLogos noAutoscroll addParameter remoteNumber ' +
'getModifiers keyboardRead userNameRead waitContinue ' +
'processInput parseCommand printVersion readNetworks ' +
'writeMessage blinkVersion cityNameRead readMessage ' +
'setDataMode parsePacket isListening setBitOrder ' +
'beginPacket isDirectory motorsWrite drawCompass ' +
'digitalRead clearScreen serialEvent rightToLeft ' +
'setTextSize leftToRight requestFrom keyReleased ' +
'compassRead analogWrite interrupts WiFiServer ' +
'disconnect playMelody parseFloat autoscroll ' +
'getPINUsed setPINUsed setTimeout sendAnalog ' +
'readSlider analogRead beginWrite createChar ' +
'motorsStop keyPressed tempoWrite readButton ' +
'subnetMask debugPrint macAddress writeGreen ' +
'randomSeed attachGPRS readString sendString ' +
'remotePort releaseAll mouseMoved background ' +
'getXChange getYChange answerCall getResult ' +
'voiceCall endPacket constrain getSocket writeJSON ' +
'getButton available connected findUntil readBytes ' +
'exitValue readGreen writeBlue startLoop IPAddress ' +
'isPressed sendSysex pauseMode gatewayIP setCursor ' +
'getOemKey tuneWrite noDisplay loadImage switchPIN ' +
'onRequest onReceive changePIN playFile noBuffer ' +
'parseInt overflow checkPIN knobRead beginTFT ' +
'bitClear updateIR bitWrite position writeRGB ' +
'highByte writeRed setSpeed readBlue noStroke ' +
'remoteIP transfer shutdown hangCall beginSMS ' +
'endWrite attached maintain noCursor checkReg ' +
'checkPUK shiftOut isValid shiftIn pulseIn ' +
'connect println localIP pinMode getIMEI ' +
'display noBlink process getBand running beginSD ' +
'drawBMP lowByte setBand release bitRead prepare ' +
'pointTo readRed setMode noFill remove listen ' +
'stroke detach attach noTone exists buffer ' +
'height bitSet circle config cursor random ' +
'IRread setDNS endSMS getKey micros ' +
'millis begin print write ready flush width ' +
'isPIN blink clear press mkdir rmdir close ' +
'point yield image BSSID click delay ' +
'read text move peek beep rect line open ' +
'seek fill size turn stop home find ' +
'step tone sqrt RSSI SSID ' +
'end bit tan cos sin pow map abs max ' +
'min get run put',
symbol: 'DIGITAL_MESSAGE FIRMATA_STRING ANALOG_MESSAGE ' +
'REPORT_DIGITAL REPORT_ANALOG INPUT_PULLUP ' +
'SET_PIN_MODE INTERNAL2V56 SYSTEM_RESET LED_BUILTIN ' +
'INTERNAL1V1 SYSEX_START INTERNAL EXTERNAL ' +
'DEFAULT OUTPUT INPUT HIGH LOW'
literal: 'DIGITAL_MESSAGE FIRMATA_STRING ANALOG_MESSAGE ' +
'REPORT_DIGITAL REPORT_ANALOG INPUT_PULLUP ' +
'SET_PIN_MODE INTERNAL2V56 SYSTEM_RESET LED_BUILTIN ' +
'INTERNAL1V1 SYSEX_START INTERNAL EXTERNAL ' +
'DEFAULT OUTPUT INPUT HIGH LOW'
},

@@ -144,0 +146,0 @@ contains: [

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

{
begin: /[\w-]+\s*\(/, returnBegin: true,
begin: /[\w-]+\(/, returnBegin: true,
contains: [

@@ -19,2 +19,9 @@ {

begin: /[\w-]+/
},
{
begin: /\(/, end: /\)/,
contains: [
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE
]
}

@@ -21,0 +28,0 @@ ]

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

var KEYWORDS = {
keyword: 'assert break case catch class const continue default do else enum extends false final finally for if ' +
'in is new null rethrow return super switch this throw true try var void while with ' +
keyword: 'assert async await break case catch class const continue default do else enum extends false final ' +
'finally for if in is new null rethrow return super switch sync this throw true try var void while with yield ' +
'abstract as dynamic export external factory get implements import library operator part set static typedef',

@@ -54,0 +54,0 @@ built_in:

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

return {
aliases: ['dpr', 'dfm', 'pas', 'pascal', 'freepascal', 'lazarus', 'lpr', 'lfm'],
case_insensitive: true,

@@ -58,0 +59,0 @@ keywords: KEYWORDS,

module.exports = function(hljs) {
return {
aliases: ['js'],
aliases: ['js', 'jsx'],
keywords: {

@@ -8,3 +8,3 @@ keyword:

'instanceof with throw case default try this switch continue typeof delete ' +
'let yield const export super debugger as async await ' +
'let yield const export super debugger as async await static ' +
// ECMAScript 6 modules import

@@ -67,5 +67,8 @@ 'import from as'

{ // E4X / JSX
begin: /</, end: />\s*[);\]]/,
relevance: 0,
subLanguage: 'xml'
begin: /</, end: /(\/\w+|\w+\/)>/,
subLanguage: 'xml',
contains: [
{begin: /<\w+\/>/, skip: true},
{begin: /<\w+/, end: /(\/\w+|\w+\/)>/, skip: true, contains: ['self']}
]
}

@@ -96,5 +99,3 @@ ],

},
{
begin: '\\.' + hljs.IDENT_RE, relevance: 0 // hack: prevents detection of keywords after dots
},
hljs.METHOD_GUARD,
{ // ES6 class

@@ -101,0 +102,0 @@ className: 'class',

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

className: 'attr',
begin: '\\s*"', end: '"\\s*:\\s*', excludeBegin: true, excludeEnd: true,
begin: /"/, end: /"/,
contains: [hljs.BACKSLASH_ESCAPE],
illegal: '\\n',
starts: VALUE_CONTAINER
}
},
hljs.inherit(VALUE_CONTAINER, {begin: /:/})
],

@@ -24,0 +24,0 @@ illegal: '\\S'

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

'bnel?|cl[oz]|divu?|ext|ins|j(al)?|jalr(\.hb)?|jr(\.hb)?|lbu?|lhu?|' +
'll|lui|lw[lr]?|maddu?|mfhi|mflo|movn|movz|msubu?|mthi|mtlo|mul|' +
'll|lui|lw[lr]?|maddu?|mfhi|mflo|movn|movz|move|msubu?|mthi|mtlo|mul|' +
'multu?|nop|nor|ori?|rotrv?|sb|sc|se[bh]|sh|sllv?|slti?u?|srav?|' +

@@ -34,0 +34,0 @@ 'srlv?|subu?|sw[lr]?|xori?|wsbh|' +

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

contains: [
hljs.C_LINE_COMMENT_MODE,
hljs.HASH_COMMENT_MODE,
hljs.COMMENT('//', '$', {contains: [PREPROCESSOR]}),
hljs.COMMENT(

@@ -47,4 +47,3 @@ '/\\*',

begin: '@[A-Za-z]+'
},
PREPROCESSOR
}
]

@@ -51,0 +50,0 @@ }

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

'option_env! print! println! select! stringify! try! unimplemented! ' +
'unreachable! vec! write! writeln!';
'unreachable! vec! write! writeln! macro_rules!';
return {

@@ -81,4 +81,6 @@ aliases: ['rs'],

className: 'class',
beginKeywords: 'type', end: '(=|<)',
contains: [hljs.UNDERSCORE_TITLE_MODE],
beginKeywords: 'type', end: ';',
contains: [
hljs.inherit(hljs.UNDERSCORE_TITLE_MODE, {endsParent: true})
],
illegal: '\\S'

@@ -85,0 +87,0 @@ },

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

var QUOTED_LIST = {
begin: /'/,
contains: [
{
begin: '\\(', end: '\\)',
contains: ['self', LITERAL, STRING, NUMBER, IDENT, QUOTED_IDENT]
}
]
};
var NAME = {
className: 'name',
begin: SCHEME_IDENT_RE,
lexemes: SCHEME_IDENT_RE,
keywords: BUILTINS
};
var LAMBDA = {
begin: /lambda/, endsWithParent: true, returnBegin: true,
contains: [
NAME,
{
begin: /\(/, end: /\)/, endsParent: true,
contains: [IDENT],
}
]
};
var LIST = {

@@ -104,19 +132,11 @@ variants: [

],
contains: [
{
className: 'name',
begin: SCHEME_IDENT_RE,
lexemes: SCHEME_IDENT_RE,
keywords: BUILTINS
},
BODY
]
contains: [LAMBDA, NAME, BODY]
};
BODY.contains = [LITERAL, NUMBER, STRING, IDENT, QUOTED_IDENT, LIST].concat(COMMENT_MODES);
BODY.contains = [LITERAL, NUMBER, STRING, IDENT, QUOTED_IDENT, QUOTED_LIST, LIST].concat(COMMENT_MODES);
return {
illegal: /\S/,
contains: [SHEBANG, NUMBER, STRING, QUOTED_IDENT, LIST].concat(COMMENT_MODES)
contains: [SHEBANG, NUMBER, STRING, QUOTED_IDENT, QUOTED_LIST, LIST].concat(COMMENT_MODES)
};
};

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

className: 'literal',
begin: '\\[(\\|\\|)?\\]|\\(\\)'
begin: /\[(\|\|)?\]|\(\)/,
relevance: 0
},

@@ -25,0 +26,0 @@ hljs.COMMENT(

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

'binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound ' +
'buffer_cache buffer_pool build bulk by byte byteordermark bytes c cache caching call calling cancel ' +
'buffer_cache buffer_pool build bulk by byte byteordermark bytes cache caching call calling cancel ' +
'capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base ' +

@@ -38,3 +38,3 @@ 'char_length character_length characters characterset charindex charset charsetform charsetid check ' +

'critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user ' +
'cursor curtime customdatum cycle d data database databases datafile datafiles datalength date_add ' +
'cursor curtime customdatum cycle data database databases datafile datafiles datalength date_add ' +
'date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts ' +

@@ -47,3 +47,3 @@ 'day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate ' +

'disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div ' +
'do document domain dotnet double downgrade drop dumpfile duplicate duration e each edition editionable ' +
'do document domain dotnet double downgrade drop dumpfile duplicate duration each edition editionable ' +
'editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt ' +

@@ -53,10 +53,10 @@ 'end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors ' +

'execu execut execute exempt exists exit exp expire explain export export_set extended extent external ' +
'external_1 external_2 externally extract f failed failed_login_attempts failover failure far fast ' +
'external_1 external_2 externally extract failed failed_login_attempts failover failure far fast ' +
'feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final ' +
'finish first first_value fixed flash_cache flashback floor flush following follows for forall force ' +
'form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ' +
'ftp full function g general generated get get_format get_lock getdate getutcdate global global_name ' +
'ftp full function general generated get get_format get_lock getdate getutcdate global global_name ' +
'globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups ' +
'gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex ' +
'hierarchy high high_priority hosts hour http i id ident_current ident_incr ident_seed identified ' +
'hierarchy high high_priority hosts hour http id ident_current ident_incr ident_seed identified ' +
'identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment ' +

@@ -67,7 +67,7 @@ 'index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile ' +

'is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists ' +
'k keep keep_duplicates key keys kill l language large last last_day last_insert_id last_value lax lcase ' +
'keep keep_duplicates key keys kill language large last last_day last_insert_id last_value lax lcase ' +
'lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit ' +
'lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate ' +
'locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call ' +
'logoff logon logs long loop low low_priority lower lpad lrtrim ltrim m main make_set makedate maketime ' +
'logoff logon logs long loop low low_priority lower lpad lrtrim ltrim main make_set makedate maketime ' +
'managed management manual map mapping mask master master_pos_wait match matched materialized max ' +

@@ -77,3 +77,3 @@ 'maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans ' +

'minimum mining minus minute minvalue missing mod mode model modification modify module monitoring month ' +
'months mount move movement multiset mutex n name name_const names nan national native natural nav nchar ' +
'months mount move movement multiset mutex name name_const names nan national native natural nav nchar ' +
'nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile ' +

@@ -88,3 +88,3 @@ 'nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile ' +

'oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary ' +
'out outer outfile outline output over overflow overriding p package pad parallel parallel_enable ' +
'out outer outfile outline output over overflow overriding package pad parallel parallel_enable ' +
'parameters parent parse partial partition partitions pascal passing password password_grace_time ' +

@@ -119,3 +119,3 @@ 'password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex ' +

'suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate ' +
'sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime t table tables tablespace tan tdo ' +
'sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime table tables tablespace tan tdo ' +
'template temporary terminated tertiary_weights test than then thread through tier ties time time_format ' +

@@ -122,0 +122,0 @@ 'time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr ' +

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

var ILLEGAL = [
'\\{',
'\\}',
'\\?',

@@ -334,3 +332,4 @@ '(\\bReturn\\b)', // monkey

'(\\bend\\b)', // vbscript
';', // sql
'(\\bdef\\b)', // gradle
';', // a whole lot of languages
'#\\s', // markdown

@@ -346,4 +345,4 @@ '\\*\\s', // markdown

case_insensitive: false,
keywords: 'if else for in',
illegal: '(' + ILLEGAL.join('|') + ')',
keywords: 'if else for in',
contains: [

@@ -438,3 +437,18 @@

className: 'attribute',
begin: '\\b(' + ATTRIBUTES.reverse().join('|') + ')\\b'
begin: '\\b(' + ATTRIBUTES.reverse().join('|') + ')\\b',
starts: {
// value container
end: /;|$/,
contains: [
HEX_COLOR,
VARIABLE,
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,
hljs.CSS_NUMBER_MODE,
hljs.NUMBER_MODE,
hljs.C_BLOCK_COMMENT_MODE
],
illegal: /\./,
relevance: 0
}
}

@@ -441,0 +455,0 @@ ]

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

// Modifiers
'async signal static abstract interface override ' +
'async signal static abstract interface override virtual delegate ' +
// Control Structures
'while do for foreach else switch case break default return try catch ' +
'if while do for foreach else switch case break default return try catch ' +
// Visibility

@@ -20,3 +20,3 @@ 'public private protected internal ' +

built_in:
'DBus GLib CCode Gee Object',
'DBus GLib CCode Gee Object Gtk',
literal:

@@ -28,3 +28,3 @@ 'false true null'

className: 'class',
beginKeywords: 'class interface delegate namespace', end: '{', excludeEnd: true,
beginKeywords: 'class interface namespace', end: '{', excludeEnd: true,
illegal: '[^,:\\n\\s\\.]',

@@ -31,0 +31,0 @@ contains: [

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

keywords: {
keyword: //ex command
keyword:
// express version except: ! & * < = > !! # @ @@
'N|0 P|0 X|0 a|0 ab abc abo al am an|0 ar arga argd arge argdo argg argl argu as au aug aun b|0 bN ba bad bd be bel bf bl bm bn bo bp br brea breaka breakd breakl bro bufdo buffers bun bw c|0 cN cNf ca cabc caddb cad caddf cal cat cb cc ccl cd ce cex cf cfir cgetb cgete cg changes chd che checkt cl cla clo cm cmapc cme cn cnew cnf cno cnorea cnoreme co col colo com comc comp con conf cope '+
'cp cpf cq cr cs cst cu cuna cunme cw d|0 delm deb debugg delc delf dif diffg diffo diffp diffpu diffs diffthis dig di dl dell dj dli do doautoa dp dr ds dsp e|0 ea ec echoe echoh echom echon el elsei em en endfo endf endt endw ene ex exe exi exu f|0 files filet fin fina fini fir fix fo foldc foldd folddoc foldo for fu g|0 go gr grepa gu gv ha h|0 helpf helpg helpt hi hid his i|0 ia iabc if ij il im imapc '+
'ime ino inorea inoreme int is isp iu iuna iunme j|0 ju k|0 keepa kee keepj lN lNf l|0 lad laddb laddf la lan lat lb lc lch lcl lcs le lefta let lex lf lfir lgetb lgete lg lgr lgrepa lh ll lla lli lmak lm lmapc lne lnew lnf ln loadk lo loc lockv lol lope lp lpf lr ls lt lu lua luad luaf lv lvimgrepa lw m|0 ma mak map mapc marks mat me menut mes mk mks mksp mkv mkvie mod mz mzf nbc nb nbs n|0 new nm nmapc nme nn nnoreme noa no noh norea noreme norm nu nun nunme ol o|0 om omapc ome on ono onoreme opt ou ounme ow p|0 '+
'profd prof pro promptr pc ped pe perld po popu pp pre prev ps pt ptN ptf ptj ptl ptn ptp ptr pts pu pw py3 python3 py3d py3f py pyd pyf q|0 quita qa r|0 rec red redi redr redraws reg res ret retu rew ri rightb rub rubyd rubyf rund ru rv s|0 sN san sa sal sav sb sbN sba sbf sbl sbm sbn sbp sbr scrip scripte scs se setf setg setl sf sfir sh sim sig sil sl sla sm smap smapc sme sn sni sno snor snoreme sor '+
'so spelld spe spelli spellr spellu spellw sp spr sre st sta startg startr star stopi stj sts sun sunm sunme sus sv sw sy synti sync t|0 tN tabN tabc tabdo tabe tabf tabfir tabl tabm tabnew '+
'tabn tabo tabp tabr tabs tab ta tags tc tcld tclf te tf th tj tl tm tn to tp tr try ts tu u|0 undoj undol una unh unl unlo unm unme uns up v|0 ve verb vert vim vimgrepa vi viu vie vm vmapc vme vne vn vnoreme vs vu vunme windo w|0 wN wa wh wi winc winp wn wp wq wqa ws wu wv x|0 xa xmapc xm xme xn xnoreme xu xunme y|0 z|0 ~ '+
'cp cpf cq cr cs cst cu cuna cunme cw delm deb debugg delc delf dif diffg diffo diffp diffpu diffs diffthis dig di dl dell dj dli do doautoa dp dr ds dsp e|0 ea ec echoe echoh echom echon el elsei em en endfo endf endt endw ene ex exe exi exu f|0 files filet fin fina fini fir fix fo foldc foldd folddoc foldo for fu go gr grepa gu gv ha helpf helpg helpt hi hid his ia iabc if ij il im imapc '+
'ime ino inorea inoreme int is isp iu iuna iunme j|0 ju k|0 keepa kee keepj lN lNf l|0 lad laddb laddf la lan lat lb lc lch lcl lcs le lefta let lex lf lfir lgetb lgete lg lgr lgrepa lh ll lla lli lmak lm lmapc lne lnew lnf ln loadk lo loc lockv lol lope lp lpf lr ls lt lu lua luad luaf lv lvimgrepa lw m|0 ma mak map mapc marks mat me menut mes mk mks mksp mkv mkvie mod mz mzf nbc nb nbs new nm nmapc nme nn nnoreme noa no noh norea noreme norm nu nun nunme ol o|0 om omapc ome on ono onoreme opt ou ounme ow p|0 '+
'profd prof pro promptr pc ped pe perld po popu pp pre prev ps pt ptN ptf ptj ptl ptn ptp ptr pts pu pw py3 python3 py3d py3f py pyd pyf quita qa rec red redi redr redraws reg res ret retu rew ri rightb rub rubyd rubyf rund ru rv sN san sa sal sav sb sbN sba sbf sbl sbm sbn sbp sbr scrip scripte scs se setf setg setl sf sfir sh sim sig sil sl sla sm smap smapc sme sn sni sno snor snoreme sor '+
'so spelld spe spelli spellr spellu spellw sp spr sre st sta startg startr star stopi stj sts sun sunm sunme sus sv sw sy synti sync tN tabN tabc tabdo tabe tabf tabfir tabl tabm tabnew '+
'tabn tabo tabp tabr tabs tab ta tags tc tcld tclf te tf th tj tl tm tn to tp tr try ts tu u|0 undoj undol una unh unl unlo unm unme uns up ve verb vert vim vimgrepa vi viu vie vm vmapc vme vne vn vnoreme vs vu vunme windo w|0 wN wa wh wi winc winp wn wp wq wqa ws wu wv x|0 xa xmapc xm xme xn xnoreme xu xunme y|0 z|0 ~ '+
// full version

@@ -27,10 +27,37 @@ 'Next Print append abbreviate abclear aboveleft all amenu anoremenu args argadd argdelete argedit argglobal arglocal argument ascii autocmd augroup aunmenu buffer bNext ball badd bdelete behave belowright bfirst blast bmodified bnext botright bprevious brewind break breakadd breakdel breaklist browse bunload '+

built_in: //built in func
'abs acos add and append argc argidx argv asin atan atan2 browse browsedir bufexists buflisted bufloaded bufname bufnr bufwinnr byte2line byteidx call ceil changenr char2nr cindent clearmatches col complete complete_add complete_check confirm copy cos cosh count cscope_connection cursor '+
'deepcopy delete did_filetype diff_filler diff_hlID empty escape eval eventhandler executable exists exp expand extend feedkeys filereadable filewritable filter finddir findfile float2nr floor fmod fnameescape fnamemodify foldclosed foldclosedend foldlevel foldtext foldtextresult foreground function '+
'garbagecollect get getbufline getbufvar getchar getcharmod getcmdline getcmdpos getcmdtype getcwd getfontname getfperm getfsize getftime getftype getline getloclist getmatches getpid getpos getqflist getreg getregtype gettabvar gettabwinvar getwinposx getwinposy getwinvar glob globpath has has_key '+
'haslocaldir hasmapto histadd histdel histget histnr hlexists hlID hostname iconv indent index input inputdialog inputlist inputrestore inputsave inputsecret insert invert isdirectory islocked items join keys len libcall libcallnr line line2byte lispindent localtime log log10 luaeval map maparg mapcheck '+
'match matchadd matcharg matchdelete matchend matchlist matchstr max min mkdir mode mzeval nextnonblank nr2char or pathshorten pow prevnonblank printf pumvisible py3eval pyeval range readfile reltime reltimestr remote_expr remote_foreground remote_peek remote_read remote_send remove rename repeat '+
'resolve reverse round screenattr screenchar screencol screenrow search searchdecl searchpair searchpairpos searchpos server2client serverlist setbufvar setcmdpos setline setloclist setmatches setpos setqflist setreg settabvar settabwinvar setwinvar sha256 shellescape shiftwidth simplify sin '+
'sinh sort soundfold spellbadword spellsuggest split sqrt str2float str2nr strchars strdisplaywidth strftime stridx string strlen strpart strridx strtrans strwidth submatch substitute synconcealed synID synIDattr '+
'synIDtrans synstack system tabpagebuflist tabpagenr tabpagewinnr tagfiles taglist tan tanh tempname tolower toupper tr trunc type undofile undotree values virtcol visualmode wildmenumode winbufnr wincol winheight winline winnr winrestcmd winrestview winsaveview winwidth writefile xor'
'synIDtrans atan2 range matcharg did_filetype asin feedkeys xor argv ' +
'complete_check add getwinposx getqflist getwinposy screencol ' +
'clearmatches empty extend getcmdpos mzeval garbagecollect setreg ' +
'ceil sqrt diff_hlID inputsecret get getfperm getpid filewritable ' +
'shiftwidth max sinh isdirectory synID system inputrestore winline ' +
'atan visualmode inputlist tabpagewinnr round getregtype mapcheck ' +
'hasmapto histdel argidx findfile sha256 exists toupper getcmdline ' +
'taglist string getmatches bufnr strftime winwidth bufexists ' +
'strtrans tabpagebuflist setcmdpos remote_read printf setloclist ' +
'getpos getline bufwinnr float2nr len getcmdtype diff_filler luaeval ' +
'resolve libcallnr foldclosedend reverse filter has_key bufname ' +
'str2float strlen setline getcharmod setbufvar index searchpos ' +
'shellescape undofile foldclosed setqflist buflisted strchars str2nr ' +
'virtcol floor remove undotree remote_expr winheight gettabwinvar ' +
'reltime cursor tabpagenr finddir localtime acos getloclist search ' +
'tanh matchend rename gettabvar strdisplaywidth type abs py3eval ' +
'setwinvar tolower wildmenumode log10 spellsuggest bufloaded ' +
'synconcealed nextnonblank server2client complete settabwinvar ' +
'executable input wincol setmatches getftype hlID inputsave ' +
'searchpair or screenrow line settabvar histadd deepcopy strpart ' +
'remote_peek and eval getftime submatch screenchar winsaveview ' +
'matchadd mkdir screenattr getfontname libcall reltimestr getfsize ' +
'winnr invert pow getbufline byte2line soundfold repeat fnameescape ' +
'tagfiles sin strwidth spellbadword trunc maparg log lispindent ' +
'hostname setpos globpath remote_foreground getchar synIDattr ' +
'fnamemodify cscope_connection stridx winbufnr indent min ' +
'complete_add nr2char searchpairpos inputdialog values matchlist ' +
'items hlexists strridx browsedir expand fmod pathshorten line2byte ' +
'argc count getwinvar glob foldtextresult getreg foreground cosh ' +
'matchdelete has char2nr simplify histget searchdecl iconv ' +
'winrestcmd pumvisible writefile foldlevel haslocaldir keys cos ' +
'matchstr foldtext histnr tan tempname getcwd byteidx getbufvar ' +
'islocked escape eventhandler remote_send serverlist winrestview ' +
'synstack pyeval prevnonblank readfile cindent filereadable changenr ' +
'exp'
},

@@ -41,7 +68,19 @@ illegal: /[{:]/,

hljs.APOS_STRING_MODE,
/*
A double quote can start either a string or a line comment. Strings are
ended before the end of a line by another double quote and can contain
escaped double-quotes and post-escaped line breaks.
Also, any double quote at the beginning of a line is a comment but we
don't handle that properly at the moment: any double quote inside will
turn them into a string. Handling it properly will require a smarter
parser.
*/
{
className: 'string',
// quote with escape, comment as quote
begin: /"((\\")|[^"\n])*("|\n)/
begin: /"(\\"|\n\\|[^"\n])*"/
},
hljs.COMMENT('"', '$'),
{

@@ -62,2 +101,6 @@ className: 'variable',

]
},
{
className: 'symbol',
begin: /<[\w-]+>/
}

@@ -64,0 +107,0 @@ ]

module.exports = function(hljs) {
var XML_IDENT_RE = '[A-Za-z0-9\\._:-]+';
var PHP = {
begin: /<\?(php)?(?!\w)/, end: /\?>/,
subLanguage: 'php'
};
var TAG_INTERNALS = {

@@ -12,3 +8,2 @@ endsWithParent: true,

contains: [
PHP,
{

@@ -25,3 +20,2 @@ className: 'attr',

className: 'string',
contains: [PHP],
variants: [

@@ -59,2 +53,7 @@ {begin: /"/, end: /"/},

{
begin: /<\?(php)?/, end: /\?>/,
subLanguage: 'php',
contains: [{begin: '/\\*', end: '\\*/', skip: true}]
},
{
className: 'tag',

@@ -86,7 +85,8 @@ /*

},
PHP,
{
className: 'meta',
begin: /<\?\w+/, end: /\?>/,
relevance: 10
variants: [
{begin: /<\?xml/, end: /\?>/, relevance: 10},
{begin: /<\?\w+/, end: /\?>/}
]
},

@@ -93,0 +93,0 @@ {

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

"homepage": "https://highlightjs.org/",
"version": "9.1.0",
"version": "9.2.0",
"author": {

@@ -787,2 +787,34 @@ "name": "Ivan Sagalaev",

"email": "martin.braun@ettus.com"
},
{
"name": "Boris Cherny",
"email": "boris@performancejs.com"
},
{
"name": "John Foster",
"email": "jfoster@esri.com"
},
{
"name": "Robert Dodier",
"email": "robert.dodier@gmail.com"
},
{
"name": "Anthony Dugois",
"email": "dev.anthonydugois@gmail.com"
},
{
"name": "Qeole",
"email": "qeole@outlook.com"
},
{
"name": "Denis Ciccale",
"email": "dciccale@gmail.com"
},
{
"name": "Michael Johnston",
"email": "lastobelus@gmail.com"
},
{
"name": "Taras",
"email": "oxdef@oxdef.info"
}

@@ -814,5 +846,5 @@ ],

"jsdom": "7.0.2",
"lodash": "^3.3.1",
"lodash": "^4.0.0",
"mocha": "^2.0.1",
"should": "^7.0.1",
"should": "^8.1.1",
"tiny-worker": "^1.1.1",

@@ -819,0 +851,0 @@ "js-beautify": "^1.5.10"

@@ -113,2 +113,9 @@ # Highlight.js

Also, if you are using something like almond, you need to use the
optimizer to give the module a name. The basic example would be:
```
r.js -o name=hljs paths.hljs=/path/to/highlight out=highlight.js
```
## License

@@ -115,0 +122,0 @@

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