23 lines
543 B
Diff
23 lines
543 B
Diff
diff --git a/d2format/format.go b/d2format/format.go
|
|
index 754e3302..a45d55f6 100644
|
|
--- a/d2format/format.go
|
|
+++ b/d2format/format.go
|
|
@@ -76,17 +76,17 @@ func (p *printer) node(n d2ast.Node) {
|
|
p.edgeIndex(n)
|
|
}
|
|
}
|
|
|
|
func (p *printer) comment(c *d2ast.Comment) {
|
|
lines := strings.Split(c.Value, "\n")
|
|
for i, line := range lines {
|
|
p.sb.WriteString("#")
|
|
- if line != "" && !strings.HasPrefix(line, " ") {
|
|
+ if line != "" {
|
|
p.sb.WriteByte(' ')
|
|
}
|
|
p.sb.WriteString(line)
|
|
if i < len(lines)-1 {
|
|
p.newline()
|
|
}
|
|
}
|
|
}
|