Closed cderv closed 3 months ago
I think that's a good idea. I'd probably move them to xfun, so they can be shared across more packages.
FYI I just added a function fenced_block()
to xfun. Note that classes are just a special case of attributes, i.e., class = 'foo'
is equivalent to attr = '.foo'
, so I didn't provide a specific class
argument to xfun::fenced_block()
.
I saw we have some helpers https://github.com/yihui/knitr/blob/031e08c74c501e0e1a5d625e0c053977b7a230ec/R/hooks-md.R#L228-L238
What about exporting
pandoc_div
in addition toknitr::raw_block
(which could probably be rewritten usingfenced_block()
🤔I often try to create some Divs or RawBlock as raw Markdow output, and having hepler function for that (support classes and attributes) can be useful.
I can also put them in quarto R package directly;