Skip to content

Commit

Permalink
Make MappingNode.String() and SequenceNode.String() the same implemen…
Browse files Browse the repository at this point in the history
…tation
  • Loading branch information
k1LoW committed Mar 9, 2020
1 parent 4474453 commit 6932590
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ast/ast.go
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ func (n *MappingNode) blockStyleString() string {

// String mapping values to text
func (n *MappingNode) String() string {
if n.IsFlowStyle {
if n.IsFlowStyle || len(n.Values) == 0 {
return n.flowStyleString()
}
return n.blockStyleString()
Expand Down

0 comments on commit 6932590

Please sign in to comment.