Closed maelle closed 4 years ago
No, this is a buglet with my yaml roundtripping that I don't know how to work around yet.
do you need the roundtripping only for adding the hash? I was thinking of a non elegant solution, replacing
---
with
hash blabla
---
using regex (with another case when the hash exists). rmarkdown
uses regex to identify the YAML.
Thanks to this issue I'm realizing tinkr
(commonmark and xlst instead of pandoc) probably doesn't handle the YAML roundtripping much better. :upside_down_face:
@maelle yeah, that's what I was thinking about doing
I wondered the same for this yaml preservation.
Just in case you don't know, there is currently an internal rmarkdown fonction to extract yaml without parsing it : partition_yaml_front_matter
It is used to preserve the yaml in md_document
format, and internally in yaml_front_matter
. Exporting this function could be a solution maybe if you want to reduce rewritten function.
extract_yaml
is simple enough though so maybe it does not worth the trouble...
Yeah I read the source to that and extracted the bit I thought was sufficient.
At the moment knitting my Rmd that has
gives
I'd understand your closing this since I should make the theme robust to this change