Socket
Book a DemoInstallSign in
Socket

@dbushell/hyperless

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dbushell/hyperless - npm Package Compare versions

Comparing version

to
0.30.0

2

package.json
{
"name": "@dbushell/hyperless",
"version": "0.29.0",
"version": "0.30.0",
"repository": {

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

@@ -7,4 +7,8 @@ import { Node } from "./html-node.ts";

* @param node HTML Node
* @param customTags Custom inline tags
*/
export const mergeInlineNodes = (node: Node): void => {
export const mergeInlineNodes = (
node: Node,
customTags = new Set<string>(),
): void => {
for (const child of [...node.children]) {

@@ -15,3 +19,3 @@ if (child.type === "OPAQUE") {

// Recursively merge sub-tree first
mergeInlineNodes(child);
mergeInlineNodes(child, customTags);
// Merge this text node into the previous text node

@@ -23,3 +27,3 @@ if (child.type === "TEXT" && child.previous?.type === "TEXT") {

}
if (inlineTags.has(child.tag)) {
if (inlineTags.has(child.tag) || customTags.has(child.tag)) {
// Merge this inline node into previous text node

@@ -26,0 +30,0 @@ if (child.previous?.type === "TEXT") {

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.