File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -110,6 +110,17 @@ replace_rmarkdown_engine <- function(){
110110 quarto_engine <- tools :: vignetteEngine(' html' , package = ' quarto' )
111111 environment(quarto_engine $ weave )$ meta $ format $ html <- quarto_html_meta()
112112 })
113+
114+ # Use knitr for of litedown (not sure if they use compatible Rmarkdown?)
115+ setHook(packageEvent(" litedown" , " onLoad" ), function (... ) {
116+ message(" Found litedown! Replacing html engine..." )
117+ tools :: vignetteEngine(' vignette' , package = ' litedown' , tangle = rmd_engine $ tangle ,
118+ pattern = rmd_engine $ pattern , weave = function (file ,... , output_format = NULL ){
119+ load_custom_output_package(file )
120+ rmd_engine $ weave(file ,... , output_format = r_universe_format())
121+ }
122+ )
123+ })
113124}
114125
115126# If a package uses a custom 'output' it may also assume functions from this package
You can’t perform that action at this time.
0 commit comments