We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b62471c commit 6ade511Copy full SHA for 6ade511
src/utils/exportAs/dbml.js
@@ -74,6 +74,14 @@ function fieldSize(field, database) {
74
return "";
75
}
76
77
+function processComment(comment) {
78
+ if (comment.includes("\n")) {
79
+ return `'''${comment}'''`;
80
+ }
81
+
82
+ return `'${escapeQuotes(comment)}'`;
83
+}
84
85
export function toDBML(diagram) {
86
const generateRelString = (rel) => {
87
const { fields: startTableFields, name: startTableName } =
@@ -139,7 +147,7 @@ export function toDBML(diagram) {
139
147
: ""
140
148
}${
141
149
table.comment && table.comment.trim() !== ""
142
- ? `\n\n\tNote: '${escapeQuotes(table.comment)}'`
150
+ ? `\n\n\tNote: ${processComment(table.comment)}`
143
151
144
152
}\n}`,
145
153
)
0 commit comments