fix(desktop): support legacy macOS WebViews
This commit is contained in:
8 files changed
+92
-6
No files matched your search
@@ -348,7 +348,7 @@ function normalizeLikeOperatorCase(sql: string, settings: SqlFormatterSettings,
|
||||
// identifiers under their existing function/identifier case settings.
|
||||
const { masked, spans } = maskStringAndCommentSpans(sql, dialect);
|
||||
const keyword = settings.keywordCase === "upper" ? "LIKE" : "like";
|
||||
const normalized = masked.replace(/(?<![.\w$:@{#])LIKE\b(?!\s*\()/gi, keyword);
|
||||
const normalized = masked.replace(/(^|[^.\w$:@{#])LIKE\b(?!\s*\()/gi, (_match, prefix: string) => `${prefix}${keyword}`);
|
||||
return restoreSpans(normalized, spans);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user