Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle escaping characters in single-quoted dyna_symbol expressions #370

Merged
merged 2 commits into from
Nov 28, 2022

Conversation

reese
Copy link
Collaborator

@reese reese commented Nov 22, 2022

Closes #347

rubyfmt enforces using double quotes everywhere, including dynamic symbol literals, but it previously was only doing escaping for string literals, so things like :'"foo"' were transformed into :""foo"", which is invalid syntax. We should also be transforming the string contents of dyna_symbols as well.

@reese reese merged commit 4d090e0 into trunk Nov 28, 2022
@reese reese deleted the reese-symbol-escapes branch November 28, 2022 16:18
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.

Single-quoted symbols that contain double quotes don't escape their contents
2 participants