Socket
Socket
Sign inDemoInstall

highlight.js

Package Overview
Dependencies
Maintainers
5
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 10.0.1 to 10.0.2

29

lib/core.js

@@ -867,3 +867,3 @@ // https://github.com/substack/deep-freeze/blob/master/index.js

var version = "10.0.1";
var version = "10.0.2";

@@ -1212,2 +1212,19 @@ /*

// edge case for when illegal matches $ (end of line) which is technically
// a 0 width match but not a begin/end match so it's not caught by the
// first handler (when ignoreIllegals is true)
if (match.type === "illegal" && lexeme === "") {
// advance so we aren't stuck in an infinite loop
return 1;
}
// infinite loops are BAD, this is a last ditch catch all. if we have a
// decent number of iterations yet our index (cursor position in our
// parsing) still 3x behind our index then something is very wrong
// so we bail
if (iterations > 100000 && iterations > match.index * 3) {
const err = new Error('potential infinite loop, way more iterations than matches');
throw err;
}
/*

@@ -1243,9 +1260,13 @@ Why might be find ourselves here? Only one occasion now. An end match that was

var relevance = 0;
var match, processedCount, index = 0;
var match;
var processedCount;
var index = 0;
var iterations = 0;
var continueScanAtSamePosition = false;
try {
var continueScanAtSamePosition = false;
top.matcher.considerAll();
while (true) {
for (;;) {
iterations++;
if (continueScanAtSamePosition) {

@@ -1252,0 +1273,0 @@ continueScanAtSamePosition = false;

2

package.json

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

"homepage": "https://highlightjs.org/",
"version": "10.0.1",
"version": "10.0.2",
"author": {

@@ -12,0 +12,0 @@ "name": "Ivan Sagalaev",

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