feat(dbml): support multiline table notes in DBML
* 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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user