Improve support of specific knitr engines for source output #783
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
it should not be pass through so that it does not end up into the div when pass as a knitr option.
This option is new from knitr 1.38 (https://github.com/yihui/knitr/blob/master/NEWS.md#changes-in-knitr-version-138)
I don't think this option
langhas any effect in Quarto yet. So we have a difference in behavior between knitr in R Markdown and in Quarto.With knitr,
langis used in various place to change the language that will be applied as class to the code chunk in Markdown. Default is the engine. Sometimes it needs to be tweaked.Example:
This is used in knitr to output a code chunk of class
jsThis is used to execute a chunk as bash but highlight as a default block.
So this PR only makes sure that the option is correctly identified a knitr option. I'll make another one (or just continue in this one if you prefer) to make the recent engine (
verbatim,embed,comment, ...) works correctly. They are not really working as expected I believe (mainly because we overwrite the source hook I think).