Skip to content

Commit

Permalink
RStudio IDE still calls parse_params(): https://github.com/rstudio/rs…
Browse files Browse the repository at this point in the history
  • Loading branch information
yihui committed Feb 13, 2024
1 parent 2b4bc30 commit ad47ce5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions R/parser.R
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,14 @@ unnamed_chunk = function(prefix = NULL, i = chunk_counter()) {
paste(prefix, i, sep = '-')
}

# this internal function is still used in RStudio IDE, otherwise can be removed
parse_params = function(params, label = TRUE) {
res = xfun::csv_options(params)
if (label && (!is.character(res$label) || identical(res$label, '')))
res$label = unnamed_chunk()
res
}

#' Partition chunk options from the code chunk body
#'
#' This is a wrapper function calling \code{xfun::\link[xfun]{divide_chunk}()}
Expand Down

0 comments on commit ad47ce5

Please sign in to comment.