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

@codemirror/highlight

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codemirror/highlight - npm Package Compare versions

Comparing version 0.19.2 to 0.19.3

6

CHANGELOG.md

@@ -0,1 +1,7 @@

## 0.19.3 (2021-09-03)
### Bug fixes
Fix a crash in the highlighter when there were multiple visible ranges in the view and the gaps between them overlap with a tree overlay.
## 0.19.2 (2021-08-19)

@@ -2,0 +8,0 @@

17

dist/index.js

@@ -460,6 +460,7 @@ import { NodeProp, NodeType } from '@lezer/common';

let nextPos = next ? next.from + start : end;
if (nextPos > pos && hasChild) {
while (cursor.from < nextPos) {
this.highlightRange(cursor, pos, nextPos, inheritedClass, depth + 1, scope);
this.startSpan(Math.min(to, cursor.to), cls);
let rangeFrom = Math.max(from, pos), rangeTo = Math.min(to, nextPos);
if (rangeFrom < rangeTo && hasChild) {
while (cursor.from < rangeTo) {
this.highlightRange(cursor, rangeFrom, rangeTo, inheritedClass, depth + 1, scope);
this.startSpan(Math.min(to, rangeTo), cls);
if (cursor.to >= nextPos || !cursor.nextSibling())

@@ -469,7 +470,9 @@ break;

}
if (!next)
if (!next || nextPos > to)
break;
this.highlightRange(inner.cursor, next.from + start, next.to + start, inheritedClass, depth, mounted.tree.type);
pos = next.to + start;
this.startSpan(pos, cls);
if (pos > from) {
this.highlightRange(inner.cursor, Math.max(from, next.from + start), Math.min(to, pos), inheritedClass, depth, mounted.tree.type);
this.startSpan(pos, cls);
}
}

@@ -476,0 +479,0 @@ if (hasChild)

{
"name": "@codemirror/highlight",
"version": "0.19.2",
"version": "0.19.3",
"description": "Syntax highlighting for the CodeMirror code editor",

@@ -5,0 +5,0 @@ "scripts": {

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