Skip to content

fix(bigquery): support escaped quotes in raw and bytes strings - #1002

Closed
MaxFreedomPollard wants to merge 1 commit into
sql-formatter-org:masterfrom
MaxFreedomPollard:fix/bigquery-raw-string-escapes
Closed

MaxFreedomPollard wants to merge 1 commit into
sql-formatter-org:masterfrom
MaxFreedomPollard:fix/bigquery-raw-string-escapes

Conversation

@MaxFreedomPollard

Copy link
Copy Markdown
Contributor

Fixes #762. BigQuery doesn't end an r'...' or b'...' string at a backslash-escaped quote (GoogleSQL lexer), but the dialect lexed them with -raw, so r'a\'b' threw a parse error. They now use -bs like plain strings, and BigQuery's shared R'' test cases are replaced with an escaped-quote test, since those cases expect r'some \' to parse and BigQuery rejects that. I ran the tests with a small jest shim because I couldn't install dependencies, so lint, prettier and tsc weren't run.

🤖 Generated with Claude Code

@nene

nene commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

I'm adopting a new policy for this repository: no AI-generated contributions. I don't care how good they are.

This is to preserve my sanity.

@nene nene closed this Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FORMATTING] BigQuery: Doesn't handle escaped quotes in raw strings

2 participants