From ad47ce5bc8cc276335068e5430dcc0242a82dea7 Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Mon, 12 Feb 2024 23:32:52 -0600 Subject: [PATCH] RStudio IDE still calls parse_params(): https://github.com/rstudio/rstudio/blob/9a6196233d8eae5aa365b73eaafba04f7714190c/src/cpp/session/modules/SessionRmdNotebook.R#L666 --- R/parser.R | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/R/parser.R b/R/parser.R index d591da7334..edcc258073 100644 --- a/R/parser.R +++ b/R/parser.R @@ -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}()}