Skip to content

Commit

Permalink
amend 3dcfac4 to fix quarto-dev/quarto-cli#5994: add YAML options to …
Browse files Browse the repository at this point in the history
…code for dot/mermaid/ojs chunks so that the full chunk content can be returned to Quarto
  • Loading branch information
yihui committed Dec 6, 2023
1 parent 3dcfac4 commit b037a31
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions R/block.R
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@ block_exec = function(options) {
# when code is not R language
res.before = run_hooks(before = TRUE, options)
engine = get_engine(options$engine)
# special case: quarto-dev/quarto-cli#5994
if (is_quarto() && options$engine %in% c('dot', 'mermaid', 'ojs')) {
options$code = c(options$yaml.code, options$code)
options$yaml.code = NULL
}
output = in_input_dir(engine(options))
if (is.list(output)) output = unlist(output)
res.after = run_hooks(before = FALSE, options)
Expand Down

0 comments on commit b037a31

Please sign in to comment.