Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

highlight.js

Package Overview
Dependencies
Maintainers
6
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.0.0-beta1 to 11.0.0

scss/github-dark-dimmed.scss

35

es/languages/arduino.js

@@ -46,5 +46,2 @@ /**

Website: https://isocpp.org
TODO: Properly handle common namespaces (std, chrono, etc.).
TODO: Properly handle type traits and type trait helper types (_t) and values (_v).
*/

@@ -263,6 +260,4 @@

const TYPES = [
const TYPE_HINTS = [
'any',
'array',
'async',
'auto_ptr',

@@ -278,3 +273,2 @@ 'barrier',

'false_type',
'function',
'future',

@@ -286,5 +280,3 @@ 'imaginary',

'latch',
'list',
'lock_guard',
'map',
'multimap',

@@ -310,3 +302,2 @@ 'multiset',

'stack',
'string',
'string_view',

@@ -331,3 +322,3 @@ 'stringstream',

const COMMON_FUNCTIONS = [
const FUNCTION_HINTS = [
'abort',

@@ -435,8 +426,2 @@ 'abs',

const BUILT_INS = [
'_Bool',
'_Complex',
'_Imaginary'
];
const LITERALS = [

@@ -450,7 +435,13 @@ 'NULL',

// https://en.cppreference.com/w/cpp/keyword
const BUILT_IN = [
'_Pragma'
];
const CPP_KEYWORDS = {
type: [...RESERVED_TYPES, ...TYPES],
type: RESERVED_TYPES,
keyword: RESERVED_KEYWORDS,
built_in: BUILT_INS,
literal: LITERALS
literal: LITERALS,
built_in: BUILT_IN,
_type_hints: TYPE_HINTS
};

@@ -462,4 +453,4 @@

keywords: {
// only for relevance, not highlighting
_hint: COMMON_FUNCTIONS
// Only for relevance, not highlighting.
_hint: FUNCTION_HINTS
},

@@ -466,0 +457,0 @@ begin: concat(

@@ -46,5 +46,2 @@ /**

Website: https://isocpp.org
TODO: Properly handle common namespaces (std, chrono, etc.).
TODO: Properly handle type traits and type trait helper types (_t) and values (_v).
*/

@@ -263,6 +260,4 @@

const TYPES = [
const TYPE_HINTS = [
'any',
'array',
'async',
'auto_ptr',

@@ -278,3 +273,2 @@ 'barrier',

'false_type',
'function',
'future',

@@ -286,5 +280,3 @@ 'imaginary',

'latch',
'list',
'lock_guard',
'map',
'multimap',

@@ -310,3 +302,2 @@ 'multiset',

'stack',
'string',
'string_view',

@@ -331,3 +322,3 @@ 'stringstream',

const COMMON_FUNCTIONS = [
const FUNCTION_HINTS = [
'abort',

@@ -435,8 +426,2 @@ 'abs',

const BUILT_INS = [
'_Bool',
'_Complex',
'_Imaginary'
];
const LITERALS = [

@@ -450,7 +435,13 @@ 'NULL',

// https://en.cppreference.com/w/cpp/keyword
const BUILT_IN = [
'_Pragma'
];
const CPP_KEYWORDS = {
type: [...RESERVED_TYPES, ...TYPES],
type: RESERVED_TYPES,
keyword: RESERVED_KEYWORDS,
built_in: BUILT_INS,
literal: LITERALS
literal: LITERALS,
built_in: BUILT_IN,
_type_hints: TYPE_HINTS
};

@@ -462,4 +453,4 @@

keywords: {
// only for relevance, not highlighting
_hint: COMMON_FUNCTIONS
// Only for relevance, not highlighting.
_hint: FUNCTION_HINTS
},

@@ -466,0 +457,0 @@ begin: concat(

@@ -17,8 +17,25 @@ /**

function stripOptionsFromArgs(args) {
const opts = args[args.length - 1];
if (typeof opts === 'object' && opts.constructor === Object) {
args.splice(args.length - 1, 1);
return opts;
} else {
return {};
}
}
/**
* @param {...(RegExp | string) } args
* Any of the passed expresssions may match
*
* Creates a huge this | this | that | that match
* @param {(RegExp | string)[] } args
* @returns {string}
*/
function concat(...args) {
const joined = args.map((x) => source(x)).join("");
function either(...args) {
const opts = stripOptionsFromArgs(args);
const joined = '(' +
(opts.capture ? "" : "?:") +
args.map((x) => source(x)).join("|") + ")";
return joined;

@@ -45,3 +62,19 @@ }

const IDENT_RE = /(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/;
const SIMPLE_IDENT = /[a-zA-Z][a-zA-Z_0-9]*/;
const NUMBER_TYPES_RE = either(
// Special case: only hexadecimal binary powers can contain fractions
/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,
// Hexadecimal numbers without fraction and optional binary power
/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,
// Decimal numbers
/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/
);
const OPERATORS_RE = /[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/;
const PUNCTUATION_RE = either(
/[()]/,
/[{}]/,
/\[\[/,
/[[\]]/,
/\\/,
/,/
);

@@ -51,4 +84,2 @@ return {

// only in Haskell, not R
illegal: /->/,
keywords: {

@@ -85,2 +116,3 @@ $pattern: IDENT_RE,

},
contains: [

@@ -99,3 +131,3 @@ // Roxygen comments

// `test/markup/r/roxygen.txt` for an example.
className: 'doctag',
scope: 'doctag',
begin: '@examples',

@@ -120,3 +152,3 @@ starts: {

// after.
className: 'doctag',
scope: 'doctag',
begin: '@param',

@@ -126,3 +158,3 @@ end: /$/,

{
className: 'variable',
scope: 'variable',
variants: [

@@ -137,7 +169,7 @@ { begin: IDENT_RE },

{
className: 'doctag',
scope: 'doctag',
begin: /@[a-zA-Z]+/
},
{
className: 'keyword',
scope: 'keyword',
begin: /\\[a-zA-Z]+/,

@@ -152,3 +184,3 @@ }

{
className: 'string',
scope: 'string',
contains: [hljs.BACKSLASH_ESCAPE],

@@ -166,44 +198,84 @@ variants: [

},
// Matching numbers immediately following punctuation and operators is
// tricky since we need to look at the character ahead of a number to
// ensure the number is not part of an identifier, and we cannot use
// negative look-behind assertions. So instead we explicitly handle all
// possible combinations of (operator|punctuation), number.
// TODO: replace with negative look-behind when available
// { begin: /(?<![a-zA-Z0-9._])0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/ },
// { begin: /(?<![a-zA-Z0-9._])0[xX][0-9a-fA-F]+([pP][+-]?\d+)?[Li]?/ },
// { begin: /(?<![a-zA-Z0-9._])(\d+(\.\d*)?|\.\d+)([eE][+-]?\d+)?[Li]?/ }
{
relevance: 0,
className: {
2: "number"
},
variants: [
// TODO: replace with negative look-behind when available
// { begin: /(?<![a-zA-Z0-9._])0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/ },
// { begin: /(?<![a-zA-Z0-9._])0[xX][0-9a-fA-F]+([pP][+-]?\d+)?[Li]?/ },
// { begin: /(?<![a-zA-Z0-9._])(\d+(\.\d*)?|\.\d+)([eE][+-]?\d+)?[Li]?/ }
{
// Special case: only hexadecimal binary powers can contain fractions.
scope: {
1: 'operator',
2: 'number'
},
match: [
/[^a-zA-Z0-9._]/, // not part of an identifier
/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/
OPERATORS_RE,
NUMBER_TYPES_RE
]
},
{
scope: {
1: 'operator',
2: 'number'
},
match: [
/[^a-zA-Z0-9._]/, // not part of an identifier
/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/
/%[^%]*%/,
NUMBER_TYPES_RE
]
},
{
scope: {
1: 'punctuation',
2: 'number'
},
match: [
/[^a-zA-Z0-9._]/, // not part of an identifier
/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/
PUNCTUATION_RE,
NUMBER_TYPES_RE
]
},
{
scope: { 2: 'number' },
match: [
/[^a-zA-Z0-9._]|^/, // not part of an identifier, or start of document
NUMBER_TYPES_RE
]
}
]
},
// Operators/punctuation when they're not directly followed by numbers
{
// infix operator
begin: '%',
end: '%'
// Relevance boost for the most common assignment form.
scope: { 3: 'operator' },
match: [
IDENT_RE,
/\s+/,
/<-/,
/\s+/
]
},
// relevance boost for assignment
{
begin: concat(SIMPLE_IDENT, "\\s+<-\\s+")
scope: 'operator',
relevance: 0,
variants: [
{ match: OPERATORS_RE },
{ match: /%[^%]*%/ }
]
},
{
// escaped identifier
scope: 'punctuation',
relevance: 0,
match: PUNCTUATION_RE
},
{
// Escaped identifier
begin: '`',

@@ -210,0 +282,0 @@ end: '`',

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

end: '$',
relevance: 2
}

@@ -58,0 +57,0 @@ ]

@@ -46,5 +46,2 @@ /**

Website: https://isocpp.org
TODO: Properly handle common namespaces (std, chrono, etc.).
TODO: Properly handle type traits and type trait helper types (_t) and values (_v).
*/

@@ -263,6 +260,4 @@

const TYPES = [
const TYPE_HINTS = [
'any',
'array',
'async',
'auto_ptr',

@@ -278,3 +273,2 @@ 'barrier',

'false_type',
'function',
'future',

@@ -286,5 +280,3 @@ 'imaginary',

'latch',
'list',
'lock_guard',
'map',
'multimap',

@@ -310,3 +302,2 @@ 'multiset',

'stack',
'string',
'string_view',

@@ -331,3 +322,3 @@ 'stringstream',

const COMMON_FUNCTIONS = [
const FUNCTION_HINTS = [
'abort',

@@ -435,8 +426,2 @@ 'abs',

const BUILT_INS = [
'_Bool',
'_Complex',
'_Imaginary'
];
const LITERALS = [

@@ -450,7 +435,13 @@ 'NULL',

// https://en.cppreference.com/w/cpp/keyword
const BUILT_IN = [
'_Pragma'
];
const CPP_KEYWORDS = {
type: [...RESERVED_TYPES, ...TYPES],
type: RESERVED_TYPES,
keyword: RESERVED_KEYWORDS,
built_in: BUILT_INS,
literal: LITERALS
literal: LITERALS,
built_in: BUILT_IN,
_type_hints: TYPE_HINTS
};

@@ -462,4 +453,4 @@

keywords: {
// only for relevance, not highlighting
_hint: COMMON_FUNCTIONS
// Only for relevance, not highlighting.
_hint: FUNCTION_HINTS
},

@@ -466,0 +457,0 @@ begin: concat(

@@ -46,5 +46,2 @@ /**

Website: https://isocpp.org
TODO: Properly handle common namespaces (std, chrono, etc.).
TODO: Properly handle type traits and type trait helper types (_t) and values (_v).
*/

@@ -263,6 +260,4 @@

const TYPES = [
const TYPE_HINTS = [
'any',
'array',
'async',
'auto_ptr',

@@ -278,3 +273,2 @@ 'barrier',

'false_type',
'function',
'future',

@@ -286,5 +280,3 @@ 'imaginary',

'latch',
'list',
'lock_guard',
'map',
'multimap',

@@ -310,3 +302,2 @@ 'multiset',

'stack',
'string',
'string_view',

@@ -331,3 +322,3 @@ 'stringstream',

const COMMON_FUNCTIONS = [
const FUNCTION_HINTS = [
'abort',

@@ -435,8 +426,2 @@ 'abs',

const BUILT_INS = [
'_Bool',
'_Complex',
'_Imaginary'
];
const LITERALS = [

@@ -450,7 +435,13 @@ 'NULL',

// https://en.cppreference.com/w/cpp/keyword
const BUILT_IN = [
'_Pragma'
];
const CPP_KEYWORDS = {
type: [...RESERVED_TYPES, ...TYPES],
type: RESERVED_TYPES,
keyword: RESERVED_KEYWORDS,
built_in: BUILT_INS,
literal: LITERALS
literal: LITERALS,
built_in: BUILT_IN,
_type_hints: TYPE_HINTS
};

@@ -462,4 +453,4 @@

keywords: {
// only for relevance, not highlighting
_hint: COMMON_FUNCTIONS
// Only for relevance, not highlighting.
_hint: FUNCTION_HINTS
},

@@ -466,0 +457,0 @@ begin: concat(

@@ -17,8 +17,25 @@ /**

function stripOptionsFromArgs(args) {
const opts = args[args.length - 1];
if (typeof opts === 'object' && opts.constructor === Object) {
args.splice(args.length - 1, 1);
return opts;
} else {
return {};
}
}
/**
* @param {...(RegExp | string) } args
* Any of the passed expresssions may match
*
* Creates a huge this | this | that | that match
* @param {(RegExp | string)[] } args
* @returns {string}
*/
function concat(...args) {
const joined = args.map((x) => source(x)).join("");
function either(...args) {
const opts = stripOptionsFromArgs(args);
const joined = '(' +
(opts.capture ? "" : "?:") +
args.map((x) => source(x)).join("|") + ")";
return joined;

@@ -45,3 +62,19 @@ }

const IDENT_RE = /(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/;
const SIMPLE_IDENT = /[a-zA-Z][a-zA-Z_0-9]*/;
const NUMBER_TYPES_RE = either(
// Special case: only hexadecimal binary powers can contain fractions
/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,
// Hexadecimal numbers without fraction and optional binary power
/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,
// Decimal numbers
/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/
);
const OPERATORS_RE = /[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/;
const PUNCTUATION_RE = either(
/[()]/,
/[{}]/,
/\[\[/,
/[[\]]/,
/\\/,
/,/
);

@@ -51,4 +84,2 @@ return {

// only in Haskell, not R
illegal: /->/,
keywords: {

@@ -85,2 +116,3 @@ $pattern: IDENT_RE,

},
contains: [

@@ -99,3 +131,3 @@ // Roxygen comments

// `test/markup/r/roxygen.txt` for an example.
className: 'doctag',
scope: 'doctag',
begin: '@examples',

@@ -120,3 +152,3 @@ starts: {

// after.
className: 'doctag',
scope: 'doctag',
begin: '@param',

@@ -126,3 +158,3 @@ end: /$/,

{
className: 'variable',
scope: 'variable',
variants: [

@@ -137,7 +169,7 @@ { begin: IDENT_RE },

{
className: 'doctag',
scope: 'doctag',
begin: /@[a-zA-Z]+/
},
{
className: 'keyword',
scope: 'keyword',
begin: /\\[a-zA-Z]+/,

@@ -152,3 +184,3 @@ }

{
className: 'string',
scope: 'string',
contains: [hljs.BACKSLASH_ESCAPE],

@@ -166,44 +198,84 @@ variants: [

},
// Matching numbers immediately following punctuation and operators is
// tricky since we need to look at the character ahead of a number to
// ensure the number is not part of an identifier, and we cannot use
// negative look-behind assertions. So instead we explicitly handle all
// possible combinations of (operator|punctuation), number.
// TODO: replace with negative look-behind when available
// { begin: /(?<![a-zA-Z0-9._])0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/ },
// { begin: /(?<![a-zA-Z0-9._])0[xX][0-9a-fA-F]+([pP][+-]?\d+)?[Li]?/ },
// { begin: /(?<![a-zA-Z0-9._])(\d+(\.\d*)?|\.\d+)([eE][+-]?\d+)?[Li]?/ }
{
relevance: 0,
className: {
2: "number"
},
variants: [
// TODO: replace with negative look-behind when available
// { begin: /(?<![a-zA-Z0-9._])0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/ },
// { begin: /(?<![a-zA-Z0-9._])0[xX][0-9a-fA-F]+([pP][+-]?\d+)?[Li]?/ },
// { begin: /(?<![a-zA-Z0-9._])(\d+(\.\d*)?|\.\d+)([eE][+-]?\d+)?[Li]?/ }
{
// Special case: only hexadecimal binary powers can contain fractions.
scope: {
1: 'operator',
2: 'number'
},
match: [
/[^a-zA-Z0-9._]/, // not part of an identifier
/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/
OPERATORS_RE,
NUMBER_TYPES_RE
]
},
{
scope: {
1: 'operator',
2: 'number'
},
match: [
/[^a-zA-Z0-9._]/, // not part of an identifier
/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/
/%[^%]*%/,
NUMBER_TYPES_RE
]
},
{
scope: {
1: 'punctuation',
2: 'number'
},
match: [
/[^a-zA-Z0-9._]/, // not part of an identifier
/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/
PUNCTUATION_RE,
NUMBER_TYPES_RE
]
},
{
scope: { 2: 'number' },
match: [
/[^a-zA-Z0-9._]|^/, // not part of an identifier, or start of document
NUMBER_TYPES_RE
]
}
]
},
// Operators/punctuation when they're not directly followed by numbers
{
// infix operator
begin: '%',
end: '%'
// Relevance boost for the most common assignment form.
scope: { 3: 'operator' },
match: [
IDENT_RE,
/\s+/,
/<-/,
/\s+/
]
},
// relevance boost for assignment
{
begin: concat(SIMPLE_IDENT, "\\s+<-\\s+")
scope: 'operator',
relevance: 0,
variants: [
{ match: OPERATORS_RE },
{ match: /%[^%]*%/ }
]
},
{
// escaped identifier
scope: 'punctuation',
relevance: 0,
match: PUNCTUATION_RE
},
{
// Escaped identifier
begin: '`',

@@ -210,0 +282,0 @@ end: '`',

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

end: '$',
relevance: 2
}

@@ -58,0 +57,0 @@ ]

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

"homepage": "https://highlightjs.org/",
"version": "11.0.0-beta1",
"version": "11.0.0",
"author": {

@@ -76,7 +76,7 @@ "name": "Ivan Sagalaev",

"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.3.1",
"eslint-plugin-promise": "^5.1.0",
"glob": "^7.1.7",
"glob-promise": "^4.0.1",
"handlebars": "^4.7.6",
"jsdom": "^16.4.0",
"jsdom": "^16.6.0",
"lodash": "^4.17.20",

@@ -83,0 +83,0 @@ "mocha": "^8.4.0",

@@ -61,15 +61,14 @@ # Highlight.js

#### Upgrading to Version 11 (currently in final beta)
#### Upgrading to Version 11
As always our major releases do contain breaking changes which may require action from users. Please read [VERSION_11_UPGRADE.md](https://github.com/highlightjs/highlight.js/blob/main/VERSION_11_UPGRADE.md) for a detailed summary of breaking changes and any actions you may need to take.
As always, major releases do contain breaking changes which may require action from users. Please read [VERSION_11_UPGRADE.md](https://github.com/highlightjs/highlight.js/blob/main/VERSION_11_UPGRADE.md) for a detailed summary of breaking changes and any actions you may need to take.
**Latest:** https://github.com/highlightjs/highlight.js/issues/3131
#### Upgrading to Version 10
**Upgrading to v10**: You really should probably be upgrading to version 11... but if you're coming from version 9 then these documents may still prove helpful.
Please read [VERSION_10_UPGRADE.md](https://github.com/highlightjs/highlight.js/blob/main/VERSION_10_UPGRADE.md) for high-level summary of breaking changes and any actions you may need to take. See [VERSION_10_BREAKING_CHANGES.md](https://github.com/highlightjs/highlight.js/blob/main/VERSION_10_BREAKING_CHANGES.md) for a more detailed list and [CHANGES.md](https://github.com/highlightjs/highlight.js/blob/main/CHANGES.md) to learn what else is new.
- [VERSION_10_UPGRADE.md](https://github.com/highlightjs/highlight.js/blob/main/VERSION_10_UPGRADE.md) and [VERSION_10_BREAKING_CHANGES.md](https://github.com/highlightjs/highlight.js/blob/main/VERSION_10_BREAKING_CHANGES.md)
#### Support for older versions <!-- omit in toc -->
Please see [SECURITY.md](https://github.com/highlightjs/highlight.js/blob/main/SECURITY.md) for support information.
Please see [SECURITY.md](https://github.com/highlightjs/highlight.js/blob/main/SECURITY.md) for long-term support information.

@@ -329,6 +328,6 @@ ---

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

@@ -339,6 +338,6 @@

```html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.7.1/build/styles/default.min.css">
<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.7.1/build/highlight.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.0.0/build/styles/default.min.css">
<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.0.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@10.7.1/build/languages/go.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.0.0/build/languages/go.min.js"></script>
```

@@ -349,6 +348,6 @@

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

@@ -355,0 +354,0 @@

@@ -7,9 +7,9 @@ # Security Policy

| Version | Support | Status |
| :-----: | :-: | :------ |
| 11.0 | :white_check_mark: | The 11.x series is currently in final beta. <br>See [VERSION_11_UPGRADE.md](https://github.com/highlightjs/highlight.js/blob/master/VERSION_11_UPGRADE.md). |
| 10.7.1 | :white_check_mark: | The 10.x series recieves regular updates, new features & security fixes. |
| Version | Support | Status |
| :-----: | :-: | :------ |
| 11.0 | :white_check_mark: | The 11.x series recieves regular updates, new features & security fixes. |
| 10.7.2 | :white_check_mark: | The 10.x series is now in maintence mode. EOL TBD.<br>See [VERSION_11_UPGRADE.md](https://github.com/highlightjs/highlight.js/blob/master/VERSION_11_UPGRADE.md).|
| <= 10.4.0 | :x: | Known vulnerabities. |
| <= 9.18.5 | :x: | Known vulnerabities. [EOL](https://github.com/highlightjs/highlight.js/issues/2877) |
| 7.x, 8.x | :x: | Obsolete. Known vulnerabities. |
| <= 9.18.5 | :x: | Known vulnerabities. [EOL](https://github.com/highlightjs/highlight.js/issues/2877) |
| 7.x, 8.x | :x: | Obsolete. Known vulnerabities. |

@@ -21,6 +21,1 @@

<!--
| 11.0 | :white_check_mark: | The 11.x series recieves regular updates, new features & security fixes. |
| 10.7.1 | :white_check_mark: | The 10.x series is in maintence mode. EOL TBD.<br>See [VERSION_11_UPGRADE.md](https://github.com/highlightjs/highlight.js/blob/master/VERSION_11_UPGRADE.md).|
-->

@@ -62,2 +62,3 @@ - [Overview of Breaking Changes](#overview-of-breaking-changes)

- `github` includes significant changes to more properly match modern GitHub syntax highlighting. If you desire the old theme you can manually copy it into your project from the [10-stable branch](https://github.com/highlightjs/highlight.js/tree/10-stable/src/styles).
- `github-gist` has been removed in favor of `github` as GitHub and GitHub Gist have converged. If you desire the theme you can manually copy it into your project from the [10-stable branch](https://github.com/highlightjs/highlight.js/tree/10-stable/src/styles).
- The `.hljs` CSS selector is now further scoped. It now targets `code.hljs` (inline code) and `pre code.hljs` (code blocks). If you are using a different element you may need to update your CSS to reapply some styling.

@@ -73,2 +74,4 @@

- `after:highlightElement` plugin callback is now fired *after* the DOM has been updated, not before.
#### API changes

@@ -75,0 +78,0 @@

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

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

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