-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor chunk hook to handle verbatim-like engine better #4735
Conversation
@cderv Hi, I tried Quarto 1.3 today and noticed that I am planning a new release of |
daf0081
to
5f88417
Compare
Thanks for reaching out @eitsupi. Yes quarto is not perfect for custom engine yet. quarto-cli/src/resources/rmd/hooks.R Line 393 in 5f88417
This is currently missing in 1.3 where we have quarto-cli/src/resources/rmd/hooks.R Line 388 in 94a815f
This is not the only issue hence this refactoring PR. We are "freezing" changes for now as we are preparing for 1.3 release - that is why this PR is on hold. However, I'll see with the team if I can cherry-pick this change into main before 1.3 release. Otherwise, you'll need some workaround in your custom engine yes. Using I wonder if there are other issues with custom engine like yours and maybe we need special attributes in knitr so that Quarto can know which is the type of engine and how it should behave. I'll try your engine and report on your repo. |
```{r}
#| output: asis
#| echo: false
file <- readLines("assets/why-shiny.shinylive")
cat(paste0(file, collapse = "\n"))
``` should be possible to write ```{asis}
#| file: why-shiny.shinylive
``` I think it needs special handling in Quarto. |
…ang option needs to be used - refactor handling of block attributes - create backticks enclosing dynamically according to code content. This is to correctly handle potential block code content using backticks already like `fenced.echo` in Quarto or `verbatim`-like engine in knitr to show markdown content. - Add more comments to remember why and how it works - exclude some engine from chunk hook `.cell-code` related processing
5f88417
to
dab8235
Compare
this is to cancel previous jobs in a PR triggered by previous commit. This will save time and free runners.
This is a draft PR and should not be merged yet. Opened for discussion and sharing work.
verbatim and embed knitr's engine should not be exception and their lang option needs to be used correctly.
fenced.echo
in Quarto orverbatim
-like engine in knitr to show markdown content..cell-code
related processingProbably require some specific review to decide if this is worth doing in 1.3 or later.
Warning: if we don't want to move knitr min requirement to 1.38, we need to copy
create_fence()
for its logic into our R code.