Preserve spaces and comment markers inside a string
Example input
select 'a -- b' as note;Expected result
SELECT
'a -- b' AS note;Select Standard SQL, uppercase keywords and two-space indentation, then format the query. The two spaces and double hyphen inside the literal remain unchanged. Compact mode also preserves that literal and retains necessary line breaks, including those around line comments. Neither operation checks tables, permissions or query results against a database.