Skip to content

fix: remove \n and \r exclusion from quoted identifiers - #2936

Merged
manticore-projects merged 3 commits into
JSQLParser:masterfrom
harryfoster2006:fix/newline-parse-fail
Nov 18, 2026
Merged

manticore-projects merged 3 commits into
JSQLParser:masterfrom
harryfoster2006:fix/newline-parse-fail

Conversation

@harryfoster2006

Copy link
Copy Markdown
Contributor

Quoted identifiers that contain a line break failed to parse. For example, a column name copied from a spreadsheet or BI tool, such as "A/\nB", produced a ParseException. The S_QUOTED_IDENTIFIER token explicitly excluded \n and \r from the body of every quoting style.

Fix

Remove the \n / \r exclusion from S_QUOTED_IDENTIFIER in JSqlParserCC.jjt for all four forms:

  • "..." (standard double-quoted)
  • "..." with MySQL backslash escapes ("\" ~[] now accepts a backslash followed by any character, including a newline)
  • ... (backtick)
  • [...] (bracket)

The identifier text is kept verbatim, so the newline survives a parse and deparse round trip unchanged.

@manticore-projects
manticore-projects merged commit 56c5388 into JSQLParser:master Nov 18, 2026
10 checks passed
@manticore-projects

Copy link
Copy Markdown
Contributor

Thank you very much!

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.

2 participants