diff --git a/R/get_source_expressions.R b/R/get_source_expressions.R index d765fcadc3..2d934ea2dc 100644 --- a/R/get_source_expressions.R +++ b/R/get_source_expressions.R @@ -109,11 +109,6 @@ get_source_expressions <- function(filename, lines = NULL) { expressions[[i]]$xml_parsed_content <- expression_xmls[[i]] expressions[[i]]$xml_find_function_calls <- build_xml_find_function_calls(expression_xmls[[i]]) } - } else { - # in R <= 4.0.5, this condition can occour - for (i in seq_along(expressions)) { - expressions[[i]]$xml_find_function_calls <- build_xml_find_function_calls(expressions[[i]]$xml_parsed_content) - } } # add global expression @@ -487,6 +482,8 @@ get_single_source_expression <- function(loc, lines = expr_lines, parsed_content = pc, xml_parsed_content = xml2::xml_missing(), + # Placeholder for xml_find_function_calls, if needed (e.g. on R <= 4.0.5 with input source "\\") + xml_find_function_calls = build_xml_find_function_calls(xml2::xml_missing()), content = content ) }