yihui / formatR

Format R Code Automatically
https://yihui.org/formatr/
255 stars 52 forks source link

bug for \\ #16

Closed yihui closed 12 years ago

yihui commented 12 years ago

this is unexpected:

tidy.source(text=c("for (i in 1:10) {", "# asdf", "'\\\\1'", "}"))

for (i in 1:10) {
    # asdf
    "\1"
}

the reason is unmask.source() replaces \\ with \ in a wrong place