Skip to content

Conversation

@ManuelHentschel
Copy link
Member

What problem did you solve?

Adds support for raw strings introduced in R 4.0.0. For details, see ? Quotes

How can I check this pull request?

E.g. the following expressions are valid raw strings in R 4.x.x:

r'(asdf\qwer)'
R"-[test]-"
r'--{\/'\/}--'

producing the output

> r'(asdf\qwer)'
[1] "asdf\\qwer"
> R"-[test]-"
[1] "test"
> r'--{\/'\/}--'
[1] "\\/'\\/"

With this PR, they should be highlighted correctly in the editor.

Note: I'm not very familiar with textmate grammars, so if this can be implemented more efficiently or should use different names etc., feel free to modify.

@renkun-ken
Copy link
Member

Thanks for working on this, closing #287.

Copy link
Member

@renkun-ken renkun-ken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works nicely.

@renkun-ken renkun-ken merged commit fbe7b5e into REditorSupport:master Dec 18, 2021
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