Comparing version 0.5.0 to 0.5.1
@@ -94,9 +94,9 @@ //TODO test it | ||
exports.insertCharacterBefore = function (parentNode, ch, referenceNode) { | ||
exports.insertTextBefore = function (parentNode, text, referenceNode) { | ||
var prevNode = parentNode.childNodes[parentNode.childNodes.indexOf(referenceNode) - 1]; | ||
if (prevNode && prevNode.nodeName === '#text') | ||
prevNode.value += ch; | ||
prevNode.value += text; | ||
else | ||
insertBefore(parentNode, createTextNode(ch), referenceNode); | ||
insertBefore(parentNode, createTextNode(text), referenceNode); | ||
}; | ||
@@ -103,0 +103,0 @@ |
{ | ||
"name": "parse5", | ||
"description": "Fast full-featured HTML parser for Node. Based on WHATWG HTML5 specification.", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"author": "Ivan Nikulin (ifaaan@gmail.com, https://github.com/inikulin)", | ||
@@ -6,0 +6,0 @@ "keywords": ["html", "parser", "html5", "WHATWG", "specification", "fast"], |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2263970