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

dispatch cases where \ has different meaning. #553

Closed
wants to merge 6 commits into from

Conversation

lorenzwalthert
Copy link
Collaborator

@lorenzwalthert lorenzwalthert commented Oct 10, 2019

Closes #551 by implementing the suggested solution outlined in #551 (comment). Put that into a file and style it with styler, all \ should be preserved, only quotes should be replaced (does not work well with reprex).


'here
is a string
'
'here\nis a string
'
'here\\nis a string'

Note that for mixing the invisible line break and \n in single quotes, we leave it as is (second example).

@lorenzwalthert
Copy link
Collaborator Author

@krlmlr can you, if you don't see a better way than my solution with the case distinction, check if I handle raw objects in a reasonable way? E.g. to get a character vector from raw, I brutally class(raw) <- "character".

@lorenzwalthert
Copy link
Collaborator Author

Closed in favor of the more concicse, elegant and general implementation (can handle mixed case) in #554.

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.

Styler does not preserve new line characters
1 participant