diff --git a/R/block.R b/R/block.R index 8ec882dc22..5f84875357 100644 --- a/R/block.R +++ b/R/block.R @@ -55,7 +55,7 @@ call_block = function(block) { if (opts_knit$get('progress')) print(block) - params$code = parse_chunk(params$code) # parse sub-chunk references + params[['code']] = parse_chunk(params[['code']]) # parse sub-chunk references ohooks = opts_hooks$get() for (opt in names(ohooks)) { diff --git a/R/parser.R b/R/parser.R index fb7f42a3f1..4c8a074226 100644 --- a/R/parser.R +++ b/R/parser.R @@ -109,7 +109,7 @@ parse_block = function(code, header, params.src, markdown_mode = out_format('mar code = parts$code label = params$label; .knitEnv$labels = c(.knitEnv$labels, label) - if (length(code) || length(params$file) || length(params$code)) { + if (length(code) || length(params[['file']]) || length(params[['code']])) { if (label %in% names(knit_code$get())) { if (identical(getOption('knitr.duplicate.label'), 'allow')) { params$label = label = unnamed_chunk(label)