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

kmdr-ast

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kmdr-ast - npm Package Compare versions

Comparing version 3.3.4 to 3.3.5

43

dist/highlight.js

@@ -42,23 +42,28 @@ "use strict";

}
const { startPosition, endPosition } = nodes[currentToken];
const point = new astNodePoint_1.default({ row, column: columnAtLine });
if (currentToken < nodes.length && astNodePoint_1.default.isInRange([startPosition, endPosition], point)) {
inRange = true;
wordInRange += char;
// if there's a token that spans till the end of the string
if (column === source.length - 1 || columnAtLine === nodes[currentToken].endPosition.column - 1) {
decoratedStrings.push(...this.decorateNode(wordInRange, nodes[currentToken], definitions));
wordInRange = "";
currentToken += 1;
inRange = false;
try {
const { startPosition, endPosition } = nodes[currentToken];
const point = new astNodePoint_1.default({ row, column: columnAtLine });
if (currentToken < nodes.length && astNodePoint_1.default.isInRange([startPosition, endPosition], point)) {
inRange = true;
wordInRange += char;
// if there's a token that spans till the end of the string
if (column === source.length - 1 || columnAtLine === nodes[currentToken].endPosition.column - 1) {
decoratedStrings.push(...this.decorateNode(wordInRange, nodes[currentToken], definitions));
wordInRange = "";
currentToken += 1;
inRange = false;
}
}
else {
if (inRange) {
decoratedStrings.push(...this.decorateNode(wordInRange, nodes[currentToken], definitions));
wordInRange = "";
currentToken += 1;
inRange = false;
}
// if the current char is not part of any token, then append it to the array
decoratedStrings.push(this.decorators.word(char));
}
}
else {
if (inRange) {
decoratedStrings.push(...this.decorateNode(wordInRange, nodes[currentToken], definitions));
wordInRange = "";
currentToken += 1;
inRange = false;
}
// if the current char is not part of any token, then append it to the array
catch (err) {
decoratedStrings.push(this.decorators.word(char));

@@ -65,0 +70,0 @@ }

{
"name": "kmdr-ast",
"version": "3.3.4",
"version": "3.3.5",
"description": "Traverse the AST of an explanation by kmdr",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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