diff --git a/R/parse_all.R b/R/parse_all.R index f9b2a9f..b187cf4 100644 --- a/R/parse_all.R +++ b/R/parse_all.R @@ -128,6 +128,8 @@ parse_all.character <- function(x, filename = NULL, allow_error = FALSE) { # Restore newlines stripped while converting to vector of lines if (length(res$src)) { res$src <- paste0(res$src, "\n") + } else { + res$src <- character() } res$expr <- lapply(res$expr, removeSource)