UNPKG

domhandler2

Version:

handler for htmlparser2 that turns pages into a dom - modified to allow for attribute transforms and modifications

47 lines 774 B
{ "name": "Normalize whitespace", "options": { "normalizeWhitespace": true }, "html": "Line one\n<br>\t \r\n\f <br>\nline two<font><br> x </font>", "expected": [ { "data": "Line one ", "type": "text" }, { "type": "tag", "name": "br", "attribs": {} }, { "data": " ", "type": "text" }, { "type": "tag", "name": "br", "attribs": {} }, { "data": " line two", "type": "text" }, { "type": "tag", "name": "font", "attribs": {}, "children": [ { "type": "tag", "name": "br", "attribs": {} }, { "data": " x ", "type": "text" } ] } ] }