comments
This commit is contained in:
parent
4bd5642e62
commit
13bf1fa646
1 changed files with 2 additions and 1 deletions
|
|
@ -331,10 +331,11 @@ func (p *printer) _map(m *d2ast.Map) {
|
||||||
// draw board nodes
|
// draw board nodes
|
||||||
for i := 0; i < len(boards); i++ {
|
for i := 0; i < len(boards); i++ {
|
||||||
n := boards[i].Unbox()
|
n := boards[i].Unbox()
|
||||||
// if this board is the very first line of the file, don't add an extra indent
|
// if this board is the very first line of the file, don't add an extra newline
|
||||||
if n.GetRange().Start.Line != 0 {
|
if n.GetRange().Start.Line != 0 {
|
||||||
p.newline()
|
p.newline()
|
||||||
}
|
}
|
||||||
|
// if scope only has boards, don't newline the first board
|
||||||
if i != 0 || len(m.Nodes) > len(boards) {
|
if i != 0 || len(m.Nodes) > len(boards) {
|
||||||
p.newline()
|
p.newline()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue