Autolinking Quarto html remove the "copy-code" button
edgararuiz opened this issue · 3 comments
edgararuiz commented
The copy-code button is removed when running downlit
on html pages created by Quarto. This happens because downlit
seems to replace any class of the DIV, instead of appending to it (
Line 54 in 4011b2f
Here is a reprex. The "test.html" file will have a copy-code button, but "downlit-test.html" will not:
qmd_lines <- c(
"---", "title: test", "---", "", "```{r}", "mtcars", "```"
)
writeLines(qmd_lines, "test.qmd")
quarto::quarto_render("test.qmd")
#> �[31m
#>
#> processing file: test.qmd
#> �[39m | | | 0% | |....................... | 33%
#> ordinary text without R code
#>
#> | |............................................... | 67%
#> label: unnamed-chunk-1
#> | |......................................................................| 100%
#> ordinary text without R code
#>
#>
#> �[31moutput file: test.knit.md
#>
#> �[39m�[1mpandoc �[22m
#> to: html
#> output-file: test.html
#> standalone: true
#> section-divs: true
#> html-math-method: mathjax
#> wrap: none
#> default-image-extension: png
#>
#> �[1mmetadata�[22m
#> document-css: false
#> link-citations: true
#> date-format: long
#> lang: en
#> title: test
#>
#> Output created: test.html
downlit::downlit_html_path("test.html", "downlit-test.html")
Created on 2022-08-05 by the reprex package (v2.0.1)
etiennebacher commented
This is taken care of in #155
edgararuiz commented
Awesome, thanks!
etiennebacher commented
@edgararuiz For information, the PR I made turned out to be wrong.