Fix empty trees line counting (#539)

Refs #450
This commit is contained in:
Mikhail f. Shiryaev
2021-05-11 14:50:05 +02:00
committed by GitHub
parent 2a1df71375
commit c893dbf25c
3 changed files with 53 additions and 1 deletions
+1
View File
@@ -591,6 +591,7 @@ func (e *Encoder) wrapTomlValue(val interface{}, parent *Tree) interface{} {
_, isTree := val.(*Tree)
_, isTreeS := val.([]*Tree)
if isTree || isTreeS {
e.line++
return val
}