markmap-html-parser
Advanced tools
Comparing version 0.18.0 to 0.18.2
@@ -164,3 +164,8 @@ "use strict"; | ||
const isHeading = level <= 6; | ||
let data = $child.data(); | ||
let data = { | ||
// If the child is an inline element and expected to be a separate node, | ||
// data from the closest `<p>` should be included, e.g. `<p data-lines><img /></p>` | ||
...$child.closest("p").data(), | ||
...$child.data() | ||
}; | ||
let html2 = result.html || ""; | ||
@@ -176,8 +181,2 @@ if ($child.is("ol>li") && (node == null ? void 0 : node.children)) { | ||
} | ||
if ($child.children("code:only-child").length) { | ||
data = { | ||
...data, | ||
...$child.children().data() | ||
}; | ||
} | ||
const childNode = addChild({ | ||
@@ -184,0 +183,0 @@ parent: node || getCurrentHeading(level), |
{ | ||
"name": "markmap-html-parser", | ||
"version": "0.18.0", | ||
"version": "0.18.2", | ||
"description": "Parse HTML into markmap data structure", | ||
@@ -64,3 +64,3 @@ "author": "Gerald <gera2ld@live.com>", | ||
}, | ||
"gitHead": "652d042cdd980487e5de70c8e1405ecf0721fa9c" | ||
"gitHead": "75261f82190df5b126faf6f6dc82adeb1c3a2cc2" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
506686
14450