gumbo-parser
Advanced tools
Comparing version 0.1.5 to 0.1.6
{ | ||
"name": "gumbo-parser", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"author": "Karl Westin <karl.westin@gmail.com>", | ||
@@ -5,0 +5,0 @@ "description": "Parsing HTML using google gumbo parser", |
@@ -43,4 +43,7 @@ # Gumbo Parser | ||
tagName (string) (normalized to lowercase) | ||
originalTag (string) original text from tag | ||
originalTagEnd (string) original closing tag from original text, if there was one | ||
children (array) -> replicating childNodes rather than children, | ||
ie all text / comment children are included | ||
tagNamespace (string) "HTML", "SVG" or "MATHML" | ||
attributes (array) | ||
@@ -98,2 +101,5 @@ | ||
**0.1.6** Adding originalTag, originalTagName and tagNamespace | ||
if the tag is unknown, parse originalTag and set in as tag | ||
**0.1.5** Updating the gumbo-parser to the latest version. This includes some security fixes, and if you use this | ||
@@ -100,0 +106,0 @@ for user content, please update. |
@@ -10,3 +10,2 @@ var gumbo = require("../node-gumbo"); | ||
var root = output.root; | ||
console.log(output); | ||
@@ -62,1 +61,12 @@ assert(!!output, "should return a value"); | ||
}); | ||
reader("/custom-tags.html", function(text) { | ||
console.log("Running: custom tags"); | ||
var root = gumbo(text).root; | ||
assert.equal(root.childNodes[1].childNodes[1].tagName, "background"); | ||
assert(/^<background/.test(root.childNodes[1].childNodes[1].originalTag)); | ||
console.log("Handles custom tags"); | ||
console.log("...done!"); | ||
}); |
Sorry, the diff of this file is not supported yet
1850673
216
2551
116