mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-12 17:27:50 +08:00
Add a newline before the final ] when pretty-printing lists and maps.
This commit is contained in:
parent
bb1078d002
commit
35f5798bcd
|
@ -118,6 +118,9 @@ func (b *ListReprBuilder) String() string {
|
|||
if b.buf.Len() == 0 {
|
||||
return "[]"
|
||||
}
|
||||
if b.Indent >= 0 {
|
||||
b.buf.WriteString("\n" + strings.Repeat(" ", b.Indent))
|
||||
}
|
||||
b.buf.WriteByte(']')
|
||||
return b.buf.String()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user