@fc-components/monaco-editor 0.3.3 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.3.3",
6
+ "version": "0.3.4",
7
7
  "license": "MIT",
8
8
  "main": "dist/index.js",
9
9
  "module": "dist/monaco-editor.esm.js",
package/src/sql/format.ts CHANGED
@@ -5,6 +5,11 @@ export function formatSql(sql: string): string {
5
5
  return format(sql, {
6
6
  tabWidth: 2,
7
7
  keywordCase: 'upper',
8
+ // Treat custom $__ prefixed macros (like $__timeFilter, $__timeRange, etc.)
9
+ // as parameter placeholders so the formatter doesn't choke on them.
10
+ paramTypes: {
11
+ custom: [{ regex: String.raw`\$__[a-zA-Z_][a-zA-Z0-9_]*` }],
12
+ },
8
13
  });
9
14
  } catch {
10
15
  // If formatting fails, return the original SQL