ascii mode: newlines in labels should not mess things up
Author: quinoxCreated Jul 25, 2026Updated Aug 26, 2026
Real nice to see ASCII output!
Slight issue with newlines in labels: they appear to get ignored by the layout engine, resulting in broken output:
Input:
foobar -> buzbux: "foo\nbar"
buzbux: {
label: "some\ntext"
}
Expected:
┌──────────┐
│ foobar │
│ │
└──────────┘
│
foo
bar
│
▼
┌──────────┐
│ │
│ some │
│ text │
│ │
└──────────┘Actual:
┌─────────┐
│ foobar │
│ │
└─────────┘
│
foo
bar
│
▼
┌──────────┐
│ │
│some
text │
│ │
└──────────┘Source: terrastruct/d2