Socket
Socket
Sign inDemoInstall

highlight.js

Package Overview
Dependencies
Maintainers
4
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 11.6.0 to 11.7.0

2

es/languages/bash.js

@@ -73,3 +73,3 @@ /*

const ARITHMETIC = {
begin: /\$\(\(/,
begin: /\$?\(\(/,
end: /\)\)/,

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

@@ -55,2 +55,3 @@ /*

},
hljs.COMMENT(/#\[\[/, /]]/),
hljs.HASH_COMMENT_MODE,

@@ -57,0 +58,0 @@ hljs.QUOTE_STRING_MODE,

@@ -108,3 +108,5 @@ // https://docs.oracle.com/javase/specs/jls/se15/html/jls-3.html#jls-3.10

'do',
'sealed'
'sealed',
'yield',
'permits'
];

@@ -111,0 +113,0 @@

@@ -205,3 +205,4 @@ const IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*';

// `<T, A extends keyof T, V>`
nextChar === ",") {
nextChar === ","
) {
response.ignoreMatch();

@@ -224,6 +225,14 @@ return;

let m;
const afterMatch = match.input.substring(afterMatchIndex);
// some more template typing stuff
// <T = any>(key?: string) => Modify<
if ((m = afterMatch.match(/^\s*=/))) {
response.ignoreMatch();
return;
}
// `<From extends string>`
// technically this could be HTML, but it smells like a type
let m;
const afterMatch = match.input.substring(afterMatchIndex);
// NOTE: This is ugh, but added specifically for https://github.com/highlightjs/highlight.js/issues/3276

@@ -371,2 +380,4 @@ if ((m = afterMatch.match(/^\s+extends\s+/))) {

TEMPLATE_STRING,
// Skip numbers when they are part of a variable name
{ match: /\$\d+/ },
NUMBER,

@@ -521,3 +532,4 @@ // This is intentional:

...BUILT_IN_GLOBALS,
"super"
"super",
"import"
]),

@@ -605,2 +617,4 @@ IDENT_RE$1, regex.lookahead(/\(/)),

COMMENT,
// Skip numbers when they are part of a variable name
{ match: /\$\d+/ },
NUMBER,

@@ -607,0 +621,0 @@ CLASS_REFERENCE,

@@ -141,7 +141,7 @@ /*

{
begin: /_{2}/,
begin: /_{2}(?!\s)/,
end: /_{2}/
},
{
begin: /\*{2}/,
begin: /\*{2}(?!\s)/,
end: /\*{2}/

@@ -156,7 +156,7 @@ }

{
begin: /\*(?!\*)/,
begin: /\*(?![*\s])/,
end: /\*/
},
{
begin: /_(?!_)/,
begin: /_(?![_\s])/,
end: /_/,

@@ -163,0 +163,0 @@ relevance: 0

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

};
const ESCAPED_DOLLAR = {
className: 'char.escape',
begin: /''\$/,
};
const ATTRS = {

@@ -63,3 +67,3 @@ begin: /[a-zA-Z0-9-_]+(\s*=)/,

className: 'string',
contains: [ ANTIQUOTE ],
contains: [ ESCAPED_DOLLAR, ANTIQUOTE ],
variants: [

@@ -66,0 +70,0 @@ {

/*
Language: Microtik RouterOS script
Language: MikroTik RouterOS script
Author: Ivan Dementev <ivan_div@mail.ru>

@@ -58,3 +58,3 @@ Description: Scripting host provides a way to automate some router maintenance tasks by means of executing user-defined scripts bounded to some event occurrence

return {
name: 'Microtik RouterOS script',
name: 'MikroTik RouterOS script',
aliases: [ 'mikrotik' ],

@@ -61,0 +61,0 @@ case_insensitive: true,

@@ -21,6 +21,19 @@ /*

const CLASS_NAME_WITH_NAMESPACE_RE = regex.concat(CLASS_NAME_RE, /(::\w+)*/);
// very popular ruby built-ins that one might even assume
// are actual keywords (despite that not being the case)
const PSEUDO_KWS = [
"include",
"extend",
"prepend",
"public",
"private",
"protected",
"raise",
"throw"
];
const RUBY_KEYWORDS = {
"variable.constant": [
"__FILE__",
"__LINE__"
"__LINE__",
"__ENCODING__"
],

@@ -34,5 +47,2 @@ "variable.language": [

"and",
"attr_accessor",
"attr_reader",
"attr_writer",
"begin",

@@ -53,3 +63,2 @@ "BEGIN",

"in",
"include",
"module",

@@ -71,6 +80,13 @@ "next",

"yield",
...PSEUDO_KWS
],
built_in: [
"proc",
"lambda"
"lambda",
"attr_accessor",
"attr_reader",
"attr_writer",
"define_method",
"private_constant",
"module_function"
],

@@ -234,2 +250,13 @@ literal: [

const INCLUDE_EXTEND = {
match: [
/(include|extend)\s+/,
CLASS_NAME_WITH_NAMESPACE_RE
],
scope: {
2: "title.class"
},
keywords: RUBY_KEYWORDS
};
const CLASS_DEFINITION = {

@@ -247,3 +274,3 @@ variants: [

match: [
/class\s+/,
/\b(class|module)\s+/,
CLASS_NAME_WITH_NAMESPACE_RE

@@ -284,3 +311,3 @@ ]

CLASS_NAME_WITH_NAMESPACE_RE,
/\.new[ (]/
/\.new[. (]/
],

@@ -292,7 +319,16 @@ scope: {

// CamelCase
const CLASS_REFERENCE = {
relevance: 0,
match: CLASS_NAME_RE,
scope: "title.class"
};
const RUBY_DEFAULT_CONTAINS = [
STRING,
CLASS_DEFINITION,
INCLUDE_EXTEND,
OBJECT_CREATION,
UPPER_CASE_CONSTANT,
CLASS_REFERENCE,
METHOD_DEFINITION,

@@ -299,0 +335,0 @@ {

@@ -183,2 +183,3 @@ /*

name: 'Scheme',
aliases: ['scm'],
illegal: /\S/,

@@ -185,0 +186,0 @@ contains: [

@@ -205,3 +205,4 @@ const IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*';

// `<T, A extends keyof T, V>`
nextChar === ",") {
nextChar === ","
) {
response.ignoreMatch();

@@ -224,6 +225,14 @@ return;

let m;
const afterMatch = match.input.substring(afterMatchIndex);
// some more template typing stuff
// <T = any>(key?: string) => Modify<
if ((m = afterMatch.match(/^\s*=/))) {
response.ignoreMatch();
return;
}
// `<From extends string>`
// technically this could be HTML, but it smells like a type
let m;
const afterMatch = match.input.substring(afterMatchIndex);
// NOTE: This is ugh, but added specifically for https://github.com/highlightjs/highlight.js/issues/3276

@@ -371,2 +380,4 @@ if ((m = afterMatch.match(/^\s+extends\s+/))) {

TEMPLATE_STRING,
// Skip numbers when they are part of a variable name
{ match: /\$\d+/ },
NUMBER,

@@ -521,3 +532,4 @@ // This is intentional:

...BUILT_IN_GLOBALS,
"super"
"super",
"import"
]),

@@ -605,2 +617,4 @@ IDENT_RE$1, regex.lookahead(/\(/)),

COMMENT,
// Skip numbers when they are part of a variable name
{ match: /\$\d+/ },
NUMBER,

@@ -607,0 +621,0 @@ CLASS_REFERENCE,

@@ -73,3 +73,3 @@ /*

const ARITHMETIC = {
begin: /\$\(\(/,
begin: /\$?\(\(/,
end: /\)\)/,

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

@@ -55,2 +55,3 @@ /*

},
hljs.COMMENT(/#\[\[/, /]]/),
hljs.HASH_COMMENT_MODE,

@@ -57,0 +58,0 @@ hljs.QUOTE_STRING_MODE,

@@ -108,3 +108,5 @@ // https://docs.oracle.com/javase/specs/jls/se15/html/jls-3.html#jls-3.10

'do',
'sealed'
'sealed',
'yield',
'permits'
];

@@ -111,0 +113,0 @@

@@ -205,3 +205,4 @@ const IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*';

// `<T, A extends keyof T, V>`
nextChar === ",") {
nextChar === ","
) {
response.ignoreMatch();

@@ -224,6 +225,14 @@ return;

let m;
const afterMatch = match.input.substring(afterMatchIndex);
// some more template typing stuff
// <T = any>(key?: string) => Modify<
if ((m = afterMatch.match(/^\s*=/))) {
response.ignoreMatch();
return;
}
// `<From extends string>`
// technically this could be HTML, but it smells like a type
let m;
const afterMatch = match.input.substring(afterMatchIndex);
// NOTE: This is ugh, but added specifically for https://github.com/highlightjs/highlight.js/issues/3276

@@ -371,2 +380,4 @@ if ((m = afterMatch.match(/^\s+extends\s+/))) {

TEMPLATE_STRING,
// Skip numbers when they are part of a variable name
{ match: /\$\d+/ },
NUMBER,

@@ -521,3 +532,4 @@ // This is intentional:

...BUILT_IN_GLOBALS,
"super"
"super",
"import"
]),

@@ -605,2 +617,4 @@ IDENT_RE$1, regex.lookahead(/\(/)),

COMMENT,
// Skip numbers when they are part of a variable name
{ match: /\$\d+/ },
NUMBER,

@@ -607,0 +621,0 @@ CLASS_REFERENCE,

@@ -141,7 +141,7 @@ /*

{
begin: /_{2}/,
begin: /_{2}(?!\s)/,
end: /_{2}/
},
{
begin: /\*{2}/,
begin: /\*{2}(?!\s)/,
end: /\*{2}/

@@ -156,7 +156,7 @@ }

{
begin: /\*(?!\*)/,
begin: /\*(?![*\s])/,
end: /\*/
},
{
begin: /_(?!_)/,
begin: /_(?![_\s])/,
end: /_/,

@@ -163,0 +163,0 @@ relevance: 0

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

};
const ESCAPED_DOLLAR = {
className: 'char.escape',
begin: /''\$/,
};
const ATTRS = {

@@ -63,3 +67,3 @@ begin: /[a-zA-Z0-9-_]+(\s*=)/,

className: 'string',
contains: [ ANTIQUOTE ],
contains: [ ESCAPED_DOLLAR, ANTIQUOTE ],
variants: [

@@ -66,0 +70,0 @@ {

/*
Language: Microtik RouterOS script
Language: MikroTik RouterOS script
Author: Ivan Dementev <ivan_div@mail.ru>

@@ -58,3 +58,3 @@ Description: Scripting host provides a way to automate some router maintenance tasks by means of executing user-defined scripts bounded to some event occurrence

return {
name: 'Microtik RouterOS script',
name: 'MikroTik RouterOS script',
aliases: [ 'mikrotik' ],

@@ -61,0 +61,0 @@ case_insensitive: true,

@@ -21,6 +21,19 @@ /*

const CLASS_NAME_WITH_NAMESPACE_RE = regex.concat(CLASS_NAME_RE, /(::\w+)*/);
// very popular ruby built-ins that one might even assume
// are actual keywords (despite that not being the case)
const PSEUDO_KWS = [
"include",
"extend",
"prepend",
"public",
"private",
"protected",
"raise",
"throw"
];
const RUBY_KEYWORDS = {
"variable.constant": [
"__FILE__",
"__LINE__"
"__LINE__",
"__ENCODING__"
],

@@ -34,5 +47,2 @@ "variable.language": [

"and",
"attr_accessor",
"attr_reader",
"attr_writer",
"begin",

@@ -53,3 +63,2 @@ "BEGIN",

"in",
"include",
"module",

@@ -71,6 +80,13 @@ "next",

"yield",
...PSEUDO_KWS
],
built_in: [
"proc",
"lambda"
"lambda",
"attr_accessor",
"attr_reader",
"attr_writer",
"define_method",
"private_constant",
"module_function"
],

@@ -234,2 +250,13 @@ literal: [

const INCLUDE_EXTEND = {
match: [
/(include|extend)\s+/,
CLASS_NAME_WITH_NAMESPACE_RE
],
scope: {
2: "title.class"
},
keywords: RUBY_KEYWORDS
};
const CLASS_DEFINITION = {

@@ -247,3 +274,3 @@ variants: [

match: [
/class\s+/,
/\b(class|module)\s+/,
CLASS_NAME_WITH_NAMESPACE_RE

@@ -284,3 +311,3 @@ ]

CLASS_NAME_WITH_NAMESPACE_RE,
/\.new[ (]/
/\.new[. (]/
],

@@ -292,7 +319,16 @@ scope: {

// CamelCase
const CLASS_REFERENCE = {
relevance: 0,
match: CLASS_NAME_RE,
scope: "title.class"
};
const RUBY_DEFAULT_CONTAINS = [
STRING,
CLASS_DEFINITION,
INCLUDE_EXTEND,
OBJECT_CREATION,
UPPER_CASE_CONSTANT,
CLASS_REFERENCE,
METHOD_DEFINITION,

@@ -299,0 +335,0 @@ {

@@ -183,2 +183,3 @@ /*

name: 'Scheme',
aliases: ['scm'],
illegal: /\S/,

@@ -185,0 +186,0 @@ contains: [

@@ -205,3 +205,4 @@ const IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*';

// `<T, A extends keyof T, V>`
nextChar === ",") {
nextChar === ","
) {
response.ignoreMatch();

@@ -224,6 +225,14 @@ return;

let m;
const afterMatch = match.input.substring(afterMatchIndex);
// some more template typing stuff
// <T = any>(key?: string) => Modify<
if ((m = afterMatch.match(/^\s*=/))) {
response.ignoreMatch();
return;
}
// `<From extends string>`
// technically this could be HTML, but it smells like a type
let m;
const afterMatch = match.input.substring(afterMatchIndex);
// NOTE: This is ugh, but added specifically for https://github.com/highlightjs/highlight.js/issues/3276

@@ -371,2 +380,4 @@ if ((m = afterMatch.match(/^\s+extends\s+/))) {

TEMPLATE_STRING,
// Skip numbers when they are part of a variable name
{ match: /\$\d+/ },
NUMBER,

@@ -521,3 +532,4 @@ // This is intentional:

...BUILT_IN_GLOBALS,
"super"
"super",
"import"
]),

@@ -605,2 +617,4 @@ IDENT_RE$1, regex.lookahead(/\(/)),

COMMENT,
// Skip numbers when they are part of a variable name
{ match: /\$\d+/ },
NUMBER,

@@ -607,0 +621,0 @@ CLASS_REFERENCE,

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

"homepage": "https://highlightjs.org/",
"version": "11.6.0",
"version": "11.7.0",
"author": "Josh Goebel <hello@joshgoebel.com>",

@@ -12,0 +12,0 @@ "contributors": [

@@ -10,4 +10,3 @@ # Highlight.js

<!-- [![build and CI status](https://badgen.net/github/checks/highlightjs/highlight.js?label=build)](https://github.com/highlightjs/highlight.js/actions?query=workflow%3A%22Node.js+CI%22) -->
![build and CI status](https://badgen.net/github/checks/highlightjs/highlight.js/main?label=build)
[![ci status](https://badgen.net/github/checks/highlightjs/highlight.js/main?label=build)](https://github.com/highlightjs/highlight.js/actions/workflows/tests.js.yml)
[![code quality](https://badgen.net/lgtm/grade/g/highlightjs/highlight.js/js?label=code+quality)](https://lgtm.com/projects/g/highlightjs/highlight.js/?mode=list)

@@ -332,6 +331,6 @@ [![vulnerabilities](https://badgen.net/snyk/highlightjs/highlight.js)](https://snyk.io/test/github/highlightjs/highlight.js?targetFile=package.json)

```html
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/styles/default.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/highlight.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/styles/default.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/highlight.min.js"></script>
<!-- and it's easy to individually load additional languages -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/languages/go.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/languages/go.min.js"></script>
```

@@ -342,7 +341,7 @@

````html
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/styles/dark.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/styles/dark.min.css">
<script type="module">
import hljs from 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/es/highlight.min.js';
import hljs from 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/es/highlight.min.js';
// and it's easy to individually load additional languages
import go from 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/es/languages/go.min.js';
import go from 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/es/languages/go.min.js';
hljs.registerLanguage('go', go);

@@ -359,6 +358,6 @@ </script>

```html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.6.0/build/styles/default.min.css">
<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.6.0/build/highlight.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.7.0/build/styles/default.min.css">
<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.7.0/build/highlight.min.js"></script>
<!-- and it's easy to individually load additional languages -->
<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.6.0/build/languages/go.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.7.0/build/languages/go.min.js"></script>
```

@@ -369,7 +368,7 @@

```html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.6.0/build/styles/default.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.7.0/build/styles/default.min.css">
<script type="module">
import hljs from 'https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.6.0/build/es/highlight.min.js';
import hljs from 'https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.7.0/build/es/highlight.min.js';
// and it's easy to individually load additional languages
import go from 'https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.6.0/build/es/languages/go.min.js';
import go from 'https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.7.0/build/es/languages/go.min.js';
hljs.registerLanguage('go', go);

@@ -384,6 +383,6 @@ </script>

```html
<link rel="stylesheet" href="https://unpkg.com/@highlightjs/cdn-assets@11.6.0/styles/default.min.css">
<script src="https://unpkg.com/@highlightjs/cdn-assets@11.6.0/highlight.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/@highlightjs/cdn-assets@11.7.0/styles/default.min.css">
<script src="https://unpkg.com/@highlightjs/cdn-assets@11.7.0/highlight.min.js"></script>
<!-- and it's easy to individually load additional languages -->
<script src="https://unpkg.com/@highlightjs/cdn-assets@11.6.0/languages/go.min.js"></script>
<script src="https://unpkg.com/@highlightjs/cdn-assets@11.7.0/languages/go.min.js"></script>
```

@@ -394,7 +393,7 @@

```html
<link rel="stylesheet" href="https://unpkg.com/@highlightjs/cdn-assets@11.6.0/styles/default.min.css">
<link rel="stylesheet" href="https://unpkg.com/@highlightjs/cdn-assets@11.7.0/styles/default.min.css">
<script type="module">
import hljs from 'https://unpkg.com/@highlightjs/cdn-assets@11.6.0/es/highlight.min.js';
import hljs from 'https://unpkg.com/@highlightjs/cdn-assets@11.7.0/es/highlight.min.js';
// and it's easy to individually load & register additional languages
import go from 'https://unpkg.com/@highlightjs/cdn-assets@11.6.0/es/languages/go.min.js';
import go from 'https://unpkg.com/@highlightjs/cdn-assets@11.7.0/es/languages/go.min.js';
hljs.registerLanguage('go', go);

@@ -401,0 +400,0 @@ </script>

@@ -44,2 +44,3 @@ # Supported Languages

| CMake | cmake, cmake.in | |
| COBOL | cobol, standard-cobol | [highlightjs-cobol](https://github.com/otterkit/highlightjs-cobol) |
| Coq | coq | |

@@ -80,3 +81,5 @@ | CSP | csp | |

| FIX | fix | |
| Flix | flix | [highlightjs-flix](https://github.com/flix/highlightjs-flix) |
| Fortran | fortran, f90, f95 | |
| FunC | func | [highlightjs-func](https://github.com/highlightjs/highlightjs-func) |
| G-Code | gcode, nc | |

@@ -122,2 +125,3 @@ | Gams | gams, gms | |

| LiveScript | livescript, ls | |
| LookML | lookml | [highlightjs-lookml](https://github.com/spectacles-ci/highlightjs-lookml) |
| Lua | lua | |

@@ -186,2 +190,3 @@ | Macaulay2 | macaulay2 | [highlightjs-macaulay2](https://github.com/d-torrance/highlightjs-macaulay2) |

| Rust | rust, rs | |
| RVT Script | rvt, rvt-script | [highlightjs-rvt-script](https://github.com/Sopitive/highlightjs-rvt-script) |
| SAS | SAS, sas | |

@@ -217,3 +222,3 @@ | SCSS | scss | |

| Twig | twig, craftcms | |
| TypeScript | typescript, ts | |
| TypeScript | typescript, ts, tsx | |
| Unicorn Rails log | unicorn-rails-log | [highlightjs-unicorn-rails-log](https://github.com/sweetppro/highlightjs-unicorn-rails-log) |

@@ -220,0 +225,0 @@ | VB.Net | vbnet, vb | |

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

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

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