als-document 1.4.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,6 +26,7 @@ function parseHTML(html) {
26
26
 
27
27
  function parseSpecial(startStr, endStr, n1, n2, tag) {
28
28
  if (!html.startsWith(startStr, i)) return false
29
+ if(currentText.length) stack[stack.length - 1].childNodes.push(new TextNode(currentText)); // new!
29
30
  const end = html.indexOf(endStr, i + n1);
30
31
  const strNode = new Node(tag, {}, stack[stack.length - 1]);
31
32
  strNode.childNodes.push(html.substring(i + n1, end));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "als-document",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "A powerful HTML parser & DOM manipulation library for both backend and frontend.",
5
5
  "main": "index.js",
6
6
  "module": "index.mjs",