SQL formatter incorrectly formats exponential numbers
When using the SQL formatter in VS Code, I noticed that it incorrectly formats exponential numbers, specifically expressions like 1e-9. Instead of keeping the exponent notation together, it adds a space between the e and the negative sign, resulting in 1e -9.
This is problematic because it can cause syntax errors when running queries in certain SQL engines, especially those that are more strict with formatting rules.
Steps to Reproduce:
Write a SQL query that includes an expression with an exponential number (e.g. SELECT 1e-9) Use the "Format Document" command or shortcut (e.g. Shift + Alt + F) Observe that the exponential number is incorrectly formatted with a space between the e and negative sign (e.g. 1e -9) Expected Behavior: The SQL formatter should keep the e and negative sign together in exponential numbers, so 1e-9 should remain 1e-9 after formatting.
Actual Behavior: The SQL formatter incorrectly adds a space between the e and negative sign, resulting in 1e -9.
Environment:
VS Code version: 1.76.1 SQL Formatter extension version: 1.4.0 Operating System: Mac os monterey
Thanks for your attention to this issue.