1
0
mirror of https://github.com/ericchiang/pup synced 2025-01-15 10:11:16 +00:00

Don't trim whitespace

This commit is contained in:
Andre Marianiello 2019-03-17 18:26:57 -04:00
parent 2bb485903c
commit 5e4c14aae9

View File

@ -276,7 +276,7 @@ func jsonify(node *html.Node) map[string]interface{} {
case html.ElementNode:
vals["tag"] = node.Data
case html.TextNode:
text := strings.TrimSpace(node.Data)
text := node.Data
if text != "" {
if pupEscapeHTML {
// don't escape javascript