New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

rehype-highlight-code-lines

Package Overview
Dependencies
Maintainers
0
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rehype-highlight-code-lines - npm Package Compare versions

Comparing version

to
1.0.2

4

dist/esm/index.js

@@ -52,6 +52,6 @@ import { visit, CONTINUE } from "unist-util-visit";

const firstChild = children[0];
const isAddition = firstChild.type === "element" &&
const isAddition = firstChild?.type === "element" &&
Array.isArray(firstChild.properties.className) &&
firstChild.properties.className.some((cls) => typeof cls === "string" && cls.includes("addition"));
const isDeletion = firstChild.type === "element" &&
const isDeletion = firstChild?.type === "element" &&
Array.isArray(firstChild.properties.className) &&

@@ -58,0 +58,0 @@ firstChild.properties.className.some((cls) => typeof cls === "string" && cls.includes("deletion"));

{
"name": "rehype-highlight-code-lines",
"version": "1.0.1",
"version": "1.0.2",
"description": "Rehype plugin to add line numbers to code blocks and allow highlighting of desired code lines",

@@ -5,0 +5,0 @@ "type": "module",

@@ -91,4 +91,5 @@ import type { Plugin } from "unified";

const firstChild = children[0];
const isAddition =
firstChild.type === "element" &&
firstChild?.type === "element" &&
Array.isArray(firstChild.properties.className) &&

@@ -98,4 +99,5 @@ firstChild.properties.className.some(

);
const isDeletion =
firstChild.type === "element" &&
firstChild?.type === "element" &&
Array.isArray(firstChild.properties.className) &&

@@ -102,0 +104,0 @@ firstChild.properties.className.some(

Sorry, the diff of this file is not supported yet