-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior
Description
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
| pre_class = "downlit sourceCode r", |
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)
Metadata
Metadata
Assignees
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior