Skip to content

Conversation

@pyramation
Copy link
Contributor

No description provided.

- Add needsEscapePrefix() method to detect backslash escape sequences
- Enhance A_Const and String methods to automatically add E-prefix when needed
- Support common escape patterns: \n, \t, \r, \b, \f, \, \', \x, \u, \U, octal
- Properly escape backslashes and quotes in E-prefixed strings
- Avoid E-prefix for hexadecimal bytea literals to prevent conflicts
- All 251 test suites pass with 264 total tests

Co-Authored-By: Dan Lynch <[email protected]>
…handling

- Move needsEscapePrefix(), escapeEString(), and formatEString() methods to QuoteUtils
- Update A_Const and String methods to use QuoteUtils.formatEString()
- Update CommentStmt comment handling to use QuoteUtils.formatEString()
- Use non-capturing regex groups for cleaner E-prefix detection
- Fix backslash escaping to use proper double backslash replacement
- Centralize all E-prefix detection and formatting logic in utilities
- All 251 test suites pass with 264 total tests

Co-Authored-By: Dan Lynch <[email protected]>
@pyramation pyramation merged commit dd0f563 into main Jun 22, 2025
1 check passed
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