fix(dbml field comments): support export field comments in dbml (#796)

* fix(dbml field comments): support export field comments in dbml

* add tests
This commit is contained in:
Guy Ben-Aharon
2025-07-27 20:53:55 +03:00
committed by GitHub
parent 4bc71c52ff
commit 0ca7008735
3 changed files with 177 additions and 1 deletions

View File

@@ -43,12 +43,19 @@ export const setupDBMLLanguage = (monaco: Monaco) => {
root: [
[/\b(Table|Ref|Indexes)\b/, 'keyword'],
[/\[.*?\]/, 'annotation'],
[/'''/, 'string', '@tripleQuoteString'],
[/".*?"/, 'string'],
[/'.*?'/, 'string'],
[/`.*?`/, 'string'],
[/[{}]/, 'delimiter'],
[/[<>]/, 'operator'],
[new RegExp(`\\b(${datatypePattern})\\b`, 'i'), 'type'], // Added 'i' flag for case-insensitive matching
],
tripleQuoteString: [
[/[^']+/, 'string'],
[/'''/, 'string', '@pop'],
[/'/, 'string'],
],
},
});
};