Open
Description
When using Prisma's triple-slash (///) documentation comments that span multiple lines (e.g. for JSON examples), the generator creates DBML with unescaped newlines in string literals, producing invalid DBML syntax (at least https://dbdiagram.io/ can't parse them).
E.g.:
model Example {
/// JSON structure example:
/// {
/// "key": "value",
/// "nested": {
/// "data": "here"
/// }
/// }
data Json
}
We get something like:
Table Example {
data Json [note: 'JSON structure example:
{
"key": "value",
"nested": {
"data": "here"
}
}']
}
I think we'd want something like this instead:
Table Example {
data Json [note: 'JSON structure example:\n{\n "key": "value",\n "nested": {\n "data": "here"\n }\n}']
}
Could we do one of (or have the option of):
- Escape newlines with \n
- Convert multi-line comments to single-line
- Omit multi-line comments from DBML output
Thanks for the package!
Metadata
Metadata
Assignees
Labels
No labels