Skip to content

R 4.0 raw string support #287

@renkun-ken

Description

@renkun-ken

Describe the bug

R 4.0 introduces raw string in the form of r"(hello, "world")" (see https://stat.ethz.ch/R-manual/R-devel/library/base/html/Quotes.html). vscode-R does not correctly handle such raw strings in the following aspects:

Suppose we have the following code:

text <- r"(hello, "world")"
dir <- r"(c:\windows\users)"

image

  1. Typing the above code results in an superflous ending quote since r" does not trigger auto-quote but )" triggers another "" in the end.
  2. The syntax does not look correct in terms of string and quotes, and escape characters.
  3. Sending the code to active terminal results in an auto-quote:

image

To reproduce, use the edd/r-4.0 PPA introduced in http://dirk.eddelbuettel.com/papers/r4_r400_binaries.pdf.

Environment (please complete the following information):

  • OS: Ubuntu 20.04
  • VSCode Version: 1.44.2
  • R Version: 4.0.0 RC (2020-04-16 r78240)
  • vscode-R version: 1.2.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions