From 997df1b0e67d145925a760a108f4cee6df4d3c19 Mon Sep 17 00:00:00 2001 From: 1ilit <1ilit@proton.me> Date: Fri, 23 May 2025 14:11:42 +0400 Subject: [PATCH] fix dbml note quotes --- src/utils/exportAs/dbml.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/exportAs/dbml.js b/src/utils/exportAs/dbml.js index e8614cc..736df39 100644 --- a/src/utils/exportAs/dbml.js +++ b/src/utils/exportAs/dbml.js @@ -1,6 +1,6 @@ import { Cardinality } from "../../data/constants"; import i18n from "../../i18n/i18n"; -import { parseDefault } from "../exportSQL/shared"; +import { escapeQuotes, parseDefault } from "../exportSQL/shared"; function columnDefault(field, database) { if (!field.default || field.default.trim() === "") { @@ -15,7 +15,7 @@ function columnComment(field) { return ""; } - return `note: '${field.comment}'`; + return `note: '${escapeQuotes(field.comment)}'`; } function columnSettings(field, database) { @@ -99,7 +99,7 @@ export function toDBML(diagram) { : "" }${ table.comment && table.comment.trim() !== "" - ? `\n\n\tNote: '${table.comment}'` + ? `\n\n\tNote: '${escapeQuotes(table.comment)}'` : "" }\n}`, )