-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
Sorry for the offensive title, but I do not know how to describe it otherwise.
My issue is with this line:
Node{Data: fmt.Sprintf("%v", v), Type: TextNode, level: level, value: fmt.Sprintf("%v", v)}
the result is that on text nodes Data and Value() both contains the exact same string representation of the underlying value. Meaning that in practice when I encounter a text node, to get its value if have to do node.Parent.Value().
So why not do: Node{Data: fmt.Sprintf("%v", v), Type: TextNode, level: level, value: v} ?
Metadata
Metadata
Assignees
Labels
No labels