Description
Currently, parse_all
(strictly speaking the evaluation of the parsed string) fails if x
contains Windows EOL-markers (\r\n
). In order to prevent this, this line
Line 28 in 166dd16
\n
or \r\n
as split characters:x <- unlist(strsplit(x, "\n|\r\n"), recursive = FALSE, use.names = TRUE)
I understand that this rarely would happen (R-functions generally handle Windows-EOLs correctly). The error may however occur if the syntax to be evaluated is copied from the clipboard. Another example where the error can occur is the jamovi module Rj (https://github.com/jonathon-love/Rj). I could also fix it there, but I thought it may be better to handle it in parse_all
.
R-code for producing the error:
evaluate::evaluate(paste(readLines("https://raw.githubusercontent.com/sjentsch/examples4jamovi/main/Factor%20analysis/Syntax_CheckCorrelations.R"), collapse = "\r\n"))