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

markmap-html-parser

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markmap-html-parser - npm Package Compare versions

Comparing version 0.15.9-alpha.5 to 0.15.9-alpha.6

1

dist/index.d.ts

@@ -23,2 +23,3 @@ import { IPureNode } from 'markmap-common';

comments?: string[];
data?: Record<string, unknown>;
}

@@ -25,0 +26,0 @@ export interface IHtmlParserOptions {

19

dist/index.js

@@ -65,6 +65,6 @@ "use strict";

if (child.type === "comment") {
const data = child.data.trim();
if (data.startsWith(MARKMAP_COMMENT_PREFIX)) {
const data2 = child.data.trim();
if (data2.startsWith(MARKMAP_COMMENT_PREFIX)) {
node.comments || (node.comments = []);
node.comments.push(data.slice(MARKMAP_COMMENT_PREFIX.length).trim());
node.comments.push(data2.slice(MARKMAP_COMMENT_PREFIX.length).trim());
$(child).remove();

@@ -74,2 +74,6 @@ }

});
const data = $el.data();
if (data && Object.keys(data).length) {
node.data = data;
}
node.html = (($el.is(options.selectorPreserveTag) ? $.html($el) : $el.html()) || "").trimEnd();

@@ -156,7 +160,12 @@ });

};
if (htmlNode.data) {
node.payload = {
...htmlNode.data
};
}
if (htmlNode.comments) {
if (htmlNode.comments.includes("foldAll")) {
node.payload = { fold: 2 };
node.payload = { ...node.payload, fold: 2 };
} else if (htmlNode.comments.includes("fold")) {
node.payload = { fold: 1 };
node.payload = { ...node.payload, fold: 1 };
}

@@ -163,0 +172,0 @@ }

{
"name": "markmap-html-parser",
"version": "0.15.9-alpha.5+c64866f",
"version": "0.15.9-alpha.6+ccc1c15",
"description": "Parse HTML into markmap data structure",

@@ -44,3 +44,3 @@ "author": "Gerald <gera2ld@live.com>",

"devDependencies": {
"markmap-common": "0.15.9-alpha.5+c64866f"
"markmap-common": "0.15.9-alpha.6+ccc1c15"
},

@@ -64,3 +64,3 @@ "dependencies": {

},
"gitHead": "c64866fb4873a99923be18ea70715aa49a6dabef"
"gitHead": "ccc1c157905c0a8aedbadcb579a79d7114b45b0b"
}

Sorry, the diff of this file is too big to display

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