diff --git a/DESCRIPTION b/DESCRIPTION index 1462003f9c..c5805116bc 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,9 +1,9 @@ Package: knitr Type: Package Title: A General-Purpose Package for Dynamic Report Generation in R -Version: 1.49.3 +Version: 1.49.4 Authors@R: c( - person("Yihui", "Xie", role = c("aut", "cre"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666")), + person("Yihui", "Xie", role = c("aut", "cre"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666", URL = "https://yihui.org")), person("Abhraneel", "Sarma", role = "ctb"), person("Adam", "Vogt", role = "ctb"), person("Alastair", "Andrew", role = "ctb"), diff --git a/R/parser.R b/R/parser.R index 4b9bcc82e2..18de0a76a7 100644 --- a/R/parser.R +++ b/R/parser.R @@ -99,7 +99,6 @@ parse_block = function(code, header, params.src, markdown_mode = out_format('mar # for quarto, preserve the actual original params.src and do not remove the engine if (!is_quarto() || opts_knit$get('tangle')) params.src = params params = xfun::csv_options(params) - if (is.null(params$label)) params$label = unnamed_chunk() # remove indent (and possibly markdown blockquote >) from code if (nzchar(spaces <- get_chunk_indent(header))) { @@ -115,6 +114,7 @@ parse_block = function(code, header, params.src, markdown_mode = out_format('mar parts = partition_chunk(engine, code) dup = intersect(names(params), names(parts$options)) params = merge_list(params, parts$options) + if (is.null(params$label)) params$label = unnamed_chunk() label = params$label if (length(dup)) warning( "Duplicated chunk option(s) ", paste0("'", dup, "'", collapse = ', '),