fix(sql): support brace placeholders in formatter

This commit is contained in:
vrustx
2026-07-15 21:18:57 +08:00
committed by GitHub
parent 9234c33e24
commit c80313eed2
4 changed files with 46 additions and 3 deletions
+7 -1
View File
@@ -249,6 +249,9 @@ test("maps DBX formatter settings to sql-formatter options", () => {
linesBetweenQueries: 1,
denseOperators: false,
newlineBeforeSemicolon: true,
paramTypes: {
custom: [{ regex: String.raw`\$\{[^}]+\}` }, { regex: String.raw`#\{[^}]+\}` }],
},
},
);
@@ -270,7 +273,10 @@ test("maps DBX formatter settings to sql-formatter options", () => {
linesBetweenQueries: 1,
denseOperators: false,
newlineBeforeSemicolon: false,
paramTypes: { positional: true },
paramTypes: {
positional: true,
custom: [{ regex: String.raw`\$\{[^}]+\}` }, { regex: String.raw`#\{[^}]+\}` }],
},
},
);
});