Skip to content

Commit

Permalink
check if options is missing or not
Browse files Browse the repository at this point in the history
there won't be any options for inline R code

closes #2237
  • Loading branch information
cderv committed Mar 2, 2023
1 parent 464bcca commit db4eafb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/output.R
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ sew.character = function(x, options, ...) {
asis_token = '<!-- KNITR_ASIS_OUTPUT_TOKEN -->'
wrap_asis = function(x, options) {
x = as.character(x)
if ((n <- length(x)) == 0 || !out_format('markdown') || !isTRUE(options$collapse))
if ((n <- length(x)) == 0 || !out_format('markdown') || missing(options) || !isTRUE(options$collapse))
return(x)
x[1] = paste0(asis_token, x[1])
x[n] = paste0(x[n], asis_token)
Expand Down

0 comments on commit db4eafb

Please sign in to comment.