highlight.js
Advanced tools
Comparing version 10.0.0 to 10.0.1
@@ -867,3 +867,3 @@ // https://github.com/substack/deep-freeze/blob/master/index.js | ||
var version = "10.0.0"; | ||
var version = "10.0.1"; | ||
@@ -1307,2 +1307,18 @@ /* | ||
// returns a valid highlight result, without actually | ||
// doing any actual work, auto highlight starts with | ||
// this and it's possible for small snippets that | ||
// auto-detection may not find a better match | ||
function justTextHighlightResult(code) { | ||
const result = { | ||
relevance: 0, | ||
emitter: new options.__emitter(options), | ||
value: escape$1(code), | ||
illegal: false, | ||
top: PLAINTEXT_LANGUAGE | ||
}; | ||
result.emitter.addText(code); | ||
return result; | ||
} | ||
/* | ||
@@ -1321,7 +1337,3 @@ Highlighting with language detection. Accepts a string with the code to | ||
languageSubset = languageSubset || options.languages || Object.keys(languages); | ||
var result = { | ||
relevance: 0, | ||
emitter: new options.__emitter(options), | ||
value: escape$1(code) | ||
}; | ||
var result = justTextHighlightResult(code); | ||
var second_best = result; | ||
@@ -1455,3 +1467,3 @@ languageSubset.filter(getLanguage).filter(autoDetection).forEach(function(name) { | ||
var PLAINTEXT_LANGUAGE = { disableAutodetect: true }; | ||
const PLAINTEXT_LANGUAGE = { disableAutodetect: true, name: 'Plain text' }; | ||
@@ -1458,0 +1470,0 @@ function registerLanguage(name, language) { |
@@ -9,3 +9,3 @@ { | ||
"homepage": "https://highlightjs.org/", | ||
"version": "10.0.0", | ||
"version": "10.0.1", | ||
"author": { | ||
@@ -1149,5 +1149,5 @@ "name": "Ivan Sagalaev", | ||
"js-beautify": "^1.10.2", | ||
"jsdom": "^16.0.1", | ||
"jsdom": "^16.2.2", | ||
"lodash": "^4.17.15", | ||
"mocha": "^7.0.1", | ||
"mocha": "^7.1.2", | ||
"rollup": "^2.0.0", | ||
@@ -1154,0 +1154,0 @@ "rollup-plugin-commonjs": "^10.1.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1452957
31933