Skip to content

Commit e5a9516

Browse files
committed
Resolve double-escaping issue with pair node key
1 parent e6dfb71 commit e5a9516

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

ast/print.go

+1-4
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,7 @@ func (n *MapNode) String() string {
212212

213213
func (n *PairNode) String() string {
214214
if str, ok := n.Key.(*StringNode); ok {
215-
if utils.IsValidIdentifier(str.Value) {
216-
return fmt.Sprintf("%s: %s", str.Value, n.Value.String())
217-
}
218-
return fmt.Sprintf("%q: %s", str.String(), n.Value.String())
215+
return fmt.Sprintf("%s: %s", str.String(), n.Value.String())
219216
}
220217
return fmt.Sprintf("(%s): %s", n.Key.String(), n.Value.String())
221218
}

0 commit comments

Comments
 (0)