Open maelle opened 3 years ago
At least I didn't expect the YAML chunk below to be modified?
just_yaml <- c("```yaml", "layout: single", "```") tmp <- tempfile() file.create(tmp) #> [1] TRUE tmp2 <- tempfile() file.create(tmp2) #> [1] TRUE writeLines(just_yaml, tmp) downlit::downlit_md_path(tmp, tmp2) readLines(tmp2) #> [1] "<pre class='chroma'>" #> [2] "<span class='nv'>layout</span><span class='o'>:</span> <span class='nv'>single</span>" #> [3] "</pre>"
Created on 2021-01-04 by the reprex package (v0.3.0.9001)
Re-opening — this is fiddly because the CodeBlock AST differs between versions. Probably no point in tackling this until the pandoc package is available.
At least I didn't expect the YAML chunk below to be modified?
Created on 2021-01-04 by the reprex package (v0.3.0.9001)