feat(dbml): support multiline table notes in DBML
Release / test (push) Successful in 1m45s
Release / release (push) Successful in 12m24s
Release / pkg-rpm (push) Successful in 2m3s
Release / pkg-deb (push) Successful in 2m17s
Release / pkg-aur (push) Successful in 2m47s

* Add parsing for triple-quoted table notes in DBML
* Update writer to format multiline notes correctly
* Enhance tests for multiline table notes handling
This commit is contained in:
2026-09-09 21:38:11 +02:00
parent ee5c009234
commit 161ac317f0
9 changed files with 159 additions and 17 deletions
+5 -1
View File
@@ -196,7 +196,11 @@ func (w *Writer) tableToDBML(t *models.Table) string {
note := strings.TrimSpace(t.Description + " " + t.Comment)
if note != "" {
fmt.Fprintf(&sb, "\n Note: '%s'\n", note)
if strings.Contains(note, "\n") {
fmt.Fprintf(&sb, "\n Note: '''\n%s\n '''\n", note)
} else {
fmt.Fprintf(&sb, "\n Note: '%s'\n", note)
}
}
sb.WriteString("}\n")