Minor improvements in Node.Bytes() implementation. Some test case tweaking.
This commit is contained in:
parent
2a2a591c08
commit
4f7417ecbc
3 changed files with 18 additions and 20 deletions
4
node.go
4
node.go
|
@ -277,7 +277,7 @@ func (this *Node) String() (s string) {
|
|||
func (this *Node) printRoot() []byte {
|
||||
var b bytes.Buffer
|
||||
for _, v := range this.Children {
|
||||
b.WriteString(v.String())
|
||||
b.Write(v.Bytes())
|
||||
}
|
||||
return b.Bytes()
|
||||
}
|
||||
|
@ -323,7 +323,7 @@ func (this *Node) printElement() []byte {
|
|||
b.WriteRune('>')
|
||||
|
||||
for _, v := range this.Children {
|
||||
b.WriteString(v.String())
|
||||
b.Write(v.Bytes())
|
||||
}
|
||||
|
||||
b.WriteString(this.Value)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue