Skip to content

Commit

Permalink
Do not override the knitr's embed engine with internal quarto's `em…
Browse files Browse the repository at this point in the history
…bed` handler

Currently the `embed` handler is only for Jupyter.

Discovered while looking at #4712 - revealjs does not work with knitr embed engine
  • Loading branch information
cderv committed Mar 9, 2023
1 parent 486c9d3 commit 53d8703
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/resources/rmd/execute.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ execute <- function(input, format, tempDir, libDir, dependencies, cwd, params, r
})

# pass through all languages handled by cell handlers in quarto
# but filter out those which should not replaced R knitr engines
ignoredHandlers <- c(
"embed" # only supported within Jupyter
)
handledLanguages <- setdiff(handledLanguages, ignoredHandlers)
langs = lapply(
setNames(handledLanguages, handledLanguages),
function(lang) {
Expand All @@ -73,7 +78,7 @@ execute <- function(input, format, tempDir, libDir, dependencies, cwd, params, r
do.call(options, r_options)
}

# get kntir options
# get knitr options
knitr <- knitr_options(format, resourceDir, handledLanguages)

# fixup options for cache
Expand Down

0 comments on commit 53d8703

Please sign in to comment.