Socket
Socket
Sign inDemoInstall

highlight.js

Package Overview
Dependencies
0
Maintainers
2
Versions
101
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 9.15.9 to 9.15.10

2

lib/languages/css.js
module.exports = function(hljs) {
var IDENT_RE = '[a-zA-Z-][a-zA-Z0-9_-]*';
var RULE = {
begin: /[A-Z\_\.\-]+\s*:/, returnBegin: true, end: ';', endsWithParent: true,
begin: /(?:[A-Z\_\.\-]+|--[a-zA-Z0-9_-]+)\s*:/, returnBegin: true, end: ';', endsWithParent: true,
contains: [

@@ -6,0 +6,0 @@ {

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

};
var HTML_TEMPLATE = {
begin: 'html`', end: '',
starts: {
end: '`', returnEnd: false,
contains: [
hljs.BACKSLASH_ESCAPE,
SUBST
],
subLanguage: 'xml',
}
};
var CSS_TEMPLATE = {
begin: 'css`', end: '',
starts: {
end: '`', returnEnd: false,
contains: [
hljs.BACKSLASH_ESCAPE,
SUBST
],
subLanguage: 'css',
}
};
var TEMPLATE_STRING = {

@@ -50,2 +72,4 @@ className: 'string',

hljs.QUOTE_STRING_MODE,
HTML_TEMPLATE,
CSS_TEMPLATE,
TEMPLATE_STRING,

@@ -75,2 +99,4 @@ NUMBER,

hljs.QUOTE_STRING_MODE,
HTML_TEMPLATE,
CSS_TEMPLATE,
TEMPLATE_STRING,

@@ -77,0 +103,0 @@ hljs.C_LINE_COMMENT_MODE,

@@ -100,2 +100,19 @@ module.exports = function(hljs) {

};
var KOTLIN_NESTED_COMMENT = hljs.COMMENT(
'/\\*', '\\*/',
{ contains: [ hljs.C_BLOCK_COMMENT_MODE ] }
);
var KOTLIN_PAREN_TYPE = {
variants: [
{ className: 'type',
begin: hljs.UNDERSCORE_IDENT_RE
},
{ begin: /\(/, end: /\)/,
contains: [] //defined later
}
]
};
var KOTLIN_PAREN_TYPE2 = KOTLIN_PAREN_TYPE;
KOTLIN_PAREN_TYPE2.variants[1].contains = [ KOTLIN_PAREN_TYPE ];
KOTLIN_PAREN_TYPE.variants[1].contains = [ KOTLIN_PAREN_TYPE2 ];

@@ -118,3 +135,3 @@ return {

hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
KOTLIN_NESTED_COMMENT,
KEYWORDS_WITH_LABEL,

@@ -153,5 +170,5 @@ LABEL,

contains: [
{className: 'type', begin: hljs.UNDERSCORE_IDENT_RE},
KOTLIN_PAREN_TYPE,
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE
KOTLIN_NESTED_COMMENT
],

@@ -161,3 +178,3 @@ relevance: 0

hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
KOTLIN_NESTED_COMMENT,
ANNOTATION_USE_SITE,

@@ -169,3 +186,3 @@ ANNOTATION,

},
hljs.C_BLOCK_COMMENT_MODE
KOTLIN_NESTED_COMMENT
]

@@ -172,0 +189,0 @@ },

@@ -18,13 +18,18 @@ module.exports = // Base deafult colors in PB IDE: background: #FFFFDF; foreground: #000000;

keywords: // PB IDE color: #006666 (Blue Stone) + Bold
// The following keywords list was taken and adapted from GuShH's PureBasic language file for GeSHi...
'And As Break CallDebugger Case CompilerCase CompilerDefault CompilerElse CompilerEndIf CompilerEndSelect ' +
'CompilerError CompilerIf CompilerSelect Continue Data DataSection EndDataSection Debug DebugLevel ' +
'Default Define Dim DisableASM DisableDebugger DisableExplicit Else ElseIf EnableASM ' +
'EnableDebugger EnableExplicit End EndEnumeration EndIf EndImport EndInterface EndMacro EndProcedure ' +
'EndSelect EndStructure EndStructureUnion EndWith Enumeration Extends FakeReturn For Next ForEach ' +
'ForEver Global Gosub Goto If Import ImportC IncludeBinary IncludeFile IncludePath Interface Macro ' +
'NewList Not Or ProcedureReturn Protected Prototype ' +
'PrototypeC Read ReDim Repeat Until Restore Return Select Shared Static Step Structure StructureUnion ' +
'Swap To Wend While With XIncludeFile XOr ' +
'Procedure ProcedureC ProcedureCDLL ProcedureDLL Declare DeclareC DeclareCDLL DeclareDLL',
// Keywords from all version of PureBASIC 5.00 upward ...
'Align And Array As Break CallDebugger Case CompilerCase CompilerDefault ' +
'CompilerElse CompilerElseIf CompilerEndIf CompilerEndSelect CompilerError ' +
'CompilerIf CompilerSelect CompilerWarning Continue Data DataSection Debug ' +
'DebugLevel Declare DeclareC DeclareCDLL DeclareDLL DeclareModule Default ' +
'Define Dim DisableASM DisableDebugger DisableExplicit Else ElseIf EnableASM ' +
'EnableDebugger EnableExplicit End EndDataSection EndDeclareModule EndEnumeration ' +
'EndIf EndImport EndInterface EndMacro EndModule EndProcedure EndSelect ' +
'EndStructure EndStructureUnion EndWith Enumeration EnumerationBinary Extends ' +
'FakeReturn For ForEach ForEver Global Gosub Goto If Import ImportC ' +
'IncludeBinary IncludeFile IncludePath Interface List Macro MacroExpandedCount ' +
'Map Module NewList NewMap Next Not Or Procedure ProcedureC ' +
'ProcedureCDLL ProcedureDLL ProcedureReturn Protected Prototype PrototypeC ReDim ' +
'Read Repeat Restore Return Runtime Select Shared Static Step Structure ' +
'StructureUnion Swap Threaded To UndefineMacro Until Until UnuseModule ' +
'UseModule Wend While With XIncludeFile XOr',
contains: [

@@ -58,2 +63,24 @@ // COMMENTS | PB IDE color: #00AAAA (Persian Green)

};
};
}
/* ==============================================================================
CHANGELOG
==============================================================================
- v.1.2 (2017-05-12)
-- BUG-FIX: Some keywords were accidentally joyned together. Now fixed.
- v.1.1 (2017-04-30)
-- Updated to PureBASIC 5.60.
-- Keywords list now built by extracting them from the PureBASIC SDK's
"SyntaxHilighting.dll" (from each PureBASIC version). Tokens from each
version are added to the list, and renamed or removed tokens are kept
for the sake of covering all versions of the language from PureBASIC
v5.00 upward. (NOTE: currently, there are no renamed or deprecated
tokens in the keywords list). For more info, see:
-- http://www.purebasic.fr/english/viewtopic.php?&p=506269
-- https://github.com/tajmone/purebasic-archives/tree/master/syntax-highlighting/guidelines
- v.1.0 (April 2016)
-- First release
-- Keywords list taken and adapted from GuShH's (Gustavo Julio Fiorenza)
PureBasic language file for GeSHi:
-- https://github.com/easybook/geshi/blob/master/geshi/purebasic.php
*/;

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

},
{
begin: /<<(-?)\w+$/, end: /^\s*\w+$/,
{ // heredocs
begin: /<<[-~]?'?(\w+)(?:.|\n)*?\n\s*\1\b/,
returnBegin: true,
contains: [
{ begin: /<<[-~]?'?/ },
{ begin: /\w+/,
endSameAsBegin: true,
contains: [hljs.BACKSLASH_ESCAPE, SUBST],
}
]
}

@@ -65,0 +73,0 @@ ]

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

};
var NUMBER = {
className: 'number',
variants: [
{ begin: '\\b(0[bB][01]+)' },
{ begin: '\\b(0[oO][0-7]+)' },
{ begin: hljs.C_NUMBER_RE }
],
relevance: 0
};
var SUBST = {
className: 'subst',
begin: '\\$\\{', end: '\\}',
keywords: KEYWORDS,
contains: [] // defined later
};
var HTML_TEMPLATE = {
begin: 'html`', end: '',
starts: {
end: '`', returnEnd: false,
contains: [
hljs.BACKSLASH_ESCAPE,
SUBST
],
subLanguage: 'xml',
}
};
var CSS_TEMPLATE = {
begin: 'css`', end: '',
starts: {
end: '`', returnEnd: false,
contains: [
hljs.BACKSLASH_ESCAPE,
SUBST
],
subLanguage: 'css',
}
};
var TEMPLATE_STRING = {
className: 'string',
begin: '`', end: '`',
contains: [
hljs.BACKSLASH_ESCAPE,
SUBST
]
};
SUBST.contains = [
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,
HTML_TEMPLATE,
CSS_TEMPLATE,
TEMPLATE_STRING,
NUMBER,
hljs.REGEXP_MODE
];
return {

@@ -65,24 +121,8 @@ aliases: ['ts'],

hljs.QUOTE_STRING_MODE,
{ // template string
className: 'string',
begin: '`', end: '`',
contains: [
hljs.BACKSLASH_ESCAPE,
{
className: 'subst',
begin: '\\$\\{', end: '\\}'
}
]
},
HTML_TEMPLATE,
CSS_TEMPLATE,
TEMPLATE_STRING,
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
{
className: 'number',
variants: [
{ begin: '\\b(0[bB][01]+)' },
{ begin: '\\b(0[oO][0-7]+)' },
{ begin: hljs.C_NUMBER_RE }
],
relevance: 0
},
NUMBER,
{ // "value" container

@@ -89,0 +129,0 @@ begin: '(' + hljs.RE_STARTERS_RE + '|\\b(case|return|throw)\\b)\\s*',

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

return {
aliases: ['html', 'xhtml', 'rss', 'atom', 'xjb', 'xsd', 'xsl', 'plist'],
aliases: ['html', 'xhtml', 'rss', 'atom', 'xjb', 'xsd', 'xsl', 'plist', 'wsf'],
case_insensitive: true,

@@ -93,3 +93,3 @@ contains: [

end: '\<\/script\>', returnEnd: true,
subLanguage: ['actionscript', 'javascript', 'handlebars', 'xml']
subLanguage: ['actionscript', 'javascript', 'handlebars', 'xml', 'vbscript']
}

@@ -96,0 +96,0 @@ },

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

"homepage": "https://highlightjs.org/",
"version": "9.15.9",
"version": "9.15.10",
"author": {

@@ -1083,2 +1083,6 @@ "name": "Ivan Sagalaev",

"email": "inzeppelin@gmail.com"
},
{
"name": "Yuri Mazursky",
"email": "mail@colomolome.com"
}

@@ -1105,3 +1109,3 @@ ],

"bluebird": "^3.5.5",
"commander": "^2.20.0",
"commander": "^3.0.0",
"del": "^5.0.0",

@@ -1108,0 +1112,0 @@ "gear-lib": "github:highlightjs/gear-lib",

@@ -30,6 +30,191 @@ # Highlight.js

The list of supported language classes is available in the [class
reference][2]. Classes can also be prefixed with either `language-` or
`lang-`.
<details>
<summary>The list of supported languages and corresponding classes.</summary>
| Language | Classes | Package |
| :-----------------------| :--------------------- | :------ |
| 1C | 1c | |
| ABNF | abnf | |
| Access logs | accesslog | |
| Ada | ada | |
| ARM assembler | armasm, arm | |
| AVR assembler | avrasm | |
| ActionScript | actionscript, as | |
| Alan | alan, i | [highlightjs-alan](https://github.com/highlightjs/highlightjs-alan) |
| AngelScript | angelscript, asc | |
| Apache | apache, apacheconf | |
| AppleScript | applescript, osascript | |
| Arcade | arcade | |
| AsciiDoc | asciidoc, adoc | |
| AspectJ | aspectj | |
| AutoHotkey | autohotkey | |
| AutoIt | autoit | |
| Awk | awk, mawk, nawk, gawk | |
| Axapta | axapta | |
| Bash | bash, sh, zsh | |
| Basic | basic | |
| BNF | bnf | |
| Brainfuck | brainfuck, bf | |
| C# | cs, csharp | |
| C++ | cpp, c, cc, h, c++, h++, hpp | |
| C/AL | cal | |
| Cache Object Script | cos, cls | |
| CMake | cmake, cmake.in | |
| Coq | coq | |
| CSP | csp | |
| CSS | css | |
| Cap’n Proto | capnproto, capnp | |
| Clojure | clojure, clj | |
| CoffeeScript | coffeescript, coffee, cson, iced | |
| Crmsh | crmsh, crm, pcmk | |
| Crystal | crystal, cr | |
| Cypher (Neo4j) | cypher | [highlightjs-cypher](https://github.com/highlightjs/highlightjs-cypher) |
| D | d | |
| DNS Zone file | dns, zone, bind | |
| DOS | dos, bat, cmd | |
| Dart | dart | |
| Delphi | delphi, dpr, dfm, pas, pascal, freepascal, lazarus, lpr, lfm | |
| Diff | diff, patch | |
| Django | django, jinja | |
| Dockerfile | dockerfile, docker | |
| dsconfig | dsconfig | |
| DTS (Device Tree) | dts | |
| Dust | dust, dst | |
| Dylan | dylan | [highlight-dylan](https://github.com/highlightjs/highlight-dylan) |
| EBNF | ebnf | |
| Elixir | elixir | |
| Elm | elm | |
| Erlang | erlang, erl | |
| Excel | excel, xls, xlsx | |
| Extempore | extempore, xtlang, xtm | [highlightjs-xtlang](https://github.com/highlightjs/highlightjs-xtlang) |
| F# | fsharp, fs | |
| FIX | fix | |
| Fortran | fortran, f90, f95 | |
| G-Code | gcode, nc | |
| Gams | gams, gms | |
| GAUSS | gauss, gss | |
| GDScript | godot, gdscript | [highlightjs-gdscript](https://github.com/highlightjs/highlightjs-gdscript) |
| Gherkin | gherkin | |
| GN for Ninja | gn, gni | [highlightjs-GN](https://github.com/highlightjs/highlightjs-GN/blob/master/gn.js) |
| Go | go, golang | |
| Golo | golo, gololang | |
| Gradle | gradle | |
| Groovy | groovy | |
| HTML, XML | xml, html, xhtml, rss, atom, xjb, xsd, xsl, plist | |
| HTTP | http, https | |
| Haml | haml | |
| Handlebars | handlebars, hbs, html.hbs, html.handlebars | |
| Haskell | haskell, hs | |
| Haxe | haxe, hx | |
| Hy | hy, hylang | |
| Ini, TOML | ini, toml | |
| Inform7 | inform7, i7 | |
| IRPF90 | irpf90 | |
| JSON | json | |
| Java | java, jsp | |
| JavaScript | javascript, js, jsx | |
| Kotlin | kotlin, kt | |
| Leaf | leaf | |
| Lasso | lasso, ls, lassoscript | |
| Less | less | |
| LDIF | ldif | |
| Lisp | lisp | |
| LiveCode Server | livecodeserver | |
| LiveScript | livescript, ls | |
| Lua | lua | |
| Makefile | makefile, mk, mak | |
| Markdown | markdown, md, mkdown, mkd | |
| Mathematica | mathematica, mma, wl | |
| Matlab | matlab | |
| Maxima | maxima | |
| Maya Embedded Language | mel | |
| Mercury | mercury | |
| mIRC Scripting Language | mirc, mrc | [highlightjs-mirc](https://github.com/highlightjs/highlightjs-mirc) |
| Mizar | mizar | |
| Mojolicious | mojolicious | |
| Monkey | monkey | |
| Moonscript | moonscript, moon | |
| N1QL | n1ql | |
| NSIS | nsis | |
| Nginx | nginx, nginxconf | |
| Nimrod | nimrod, nim | |
| Nix | nix | |
| OCaml | ocaml, ml | |
| Objective C | objectivec, mm, objc, obj-c | |
| OpenGL Shading Language | glsl | |
| OpenSCAD | openscad, scad | |
| Oracle Rules Language | ruleslanguage | |
| Oxygene | oxygene | |
| PF | pf, pf.conf | |
| PHP | php, php3, php4, php5, php6 | |
| Parser3 | parser3 | |
| Perl | perl, pl, pm | |
| Plaintext: no highlight | plaintext | |
| Pony | pony | |
| PostgreSQL & PL/pgSQL | pgsql, postgres, postgresql | |
| PowerShell | powershell, ps | |
| Processing | processing | |
| Prolog | prolog | |
| Properties | properties | |
| Protocol Buffers | protobuf | |
| Puppet | puppet, pp | |
| Python | python, py, gyp | |
| Python profiler results | profile | |
| Q | k, kdb | |
| QML | qml | |
| R | r | |
| Razor CSHTML | cshtml, razor, razor-cshtml | [highlightjs-cshtml-razor](https://github.com/highlightjs/highlightjs-cshtml-razor) |
| ReasonML | reasonml, re | |
| RenderMan RIB | rib | |
| RenderMan RSL | rsl | |
| Roboconf | graph, instances | |
| Robot Framework | robot, rf | [highlightjs-robot](https://github.com/highlightjs/highlightjs-robot) |
| RPM spec files | rpm-specfile, rpm, spec, rpm-spec, specfile | [highlightjs-rpm-specfile](https://github.com/highlightjs/highlightjs-rpm-specfile) |
| Ruby | ruby, rb, gemspec, podspec, thor, irb | |
| Rust | rust, rs | |
| SAS | SAS, sas | |
| SCSS | scss | |
| SQL | sql | |
| STEP Part 21 | p21, step, stp | |
| Scala | scala | |
| Scheme | scheme | |
| Scilab | scilab, sci | |
| Shape Expressions | shexc | [highlightjs-shexc](https://github.com/highlightjs/highlightjs-shexc) |
| Shell | shell, console | |
| Smali | smali | |
| Smalltalk | smalltalk, st | |
| Solidity | solidity, sol | [highlightjs-solidity](https://github.com/highlightjs/highlightjs-solidity) |
| Stan | stan | |
| Stata | stata | |
| Structured Text | iecst, scl, stl, structured-text | [highlightjs-structured-text](https://github.com/highlightjs/highlightjs-structured-text) |
| Stylus | stylus, styl | |
| SubUnit | subunit | |
| Supercollider | supercollider, sc | [highlightjs-supercollider](https://github.com/highlightjs/highlightjs-supercollider) |
| Swift | swift | |
| Tcl | tcl, tk | |
| Terraform (HCL) | terraform, tf, hcl | [highlightjs-terraform](https://github.com/highlightjs/highlightjs-terraform) |
| Test Anything Protocol | tap | |
| TeX | tex | |
| Thrift | thrift | |
| TP | tp | |
| Twig | twig, craftcms | |
| TypeScript | typescript, ts | |
| VB.Net | vbnet, vb | |
| VBScript | vbscript, vbs | |
| VHDL | vhdl | |
| Vala | vala | |
| Verilog | verilog, v | |
| Vim Script | vim | |
| x86 Assembly | x86asm | |
| XL | xl, tao | |
| XQuery | xquery, xpath, xq | |
| YAML | yml, yaml | |
| Zephir | zephir, zep | |
Languages with the specified package name are defined in separate repositories
and not included in `highlight.pack.js`.
</details>
Classes can also be prefixed with either `language-` or `lang-`.
To make arbitrary text look like code, but without highlighting, use the

@@ -128,3 +313,3 @@ `plaintext` class:

charset="UTF-8"
src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/languages/go.min.js"></script>
src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.9/languages/go.min.js"></script>
```

@@ -131,0 +316,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc