I don't know if this is expected behavior, or an issue to fix, but this would be some improvement.
It seems output hook is using options sets by engine or function in the chunk (like options$results = 'asis'), but others like chunk hook will only use the current chunk option as the one set in the source code
The `.wrapped` div is never removed, while the `.internal` div is removed if the `results == "asis"` as set by the engine in this example.
This is related to
* https://github.com/quarto-dev/quarto-cli/issues/9184
Currently in Quarto only setting `output: asis` explicitly on the cell will allow to remove the external wrapping of output.
Quarto redifines the chunk hook for this wrapping and checks the `options$results`
I wonder if there should be a mechanism for **knitr** hooks to consider the options as redefined possibly by the cell behavior and not just the explicit definition on cell options.
I don't know if this is expected behavior, or an issue to fix, but this would be some improvement.
It seems
output
hook is using options sets by engine or function in the chunk (likeoptions$results = 'asis'
), but others likechunk
hook will only use the current chunk option as the one set in the source codeExample
::: {.internal}
::: :::
::: {.wrapped}
Should be
asis
content.:::