1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
test_that("Fix for issue #358 works", {
skip_if_not(
rmarkdown::pandoc_available(),
"Test requires pandoc to be installed"
)
file <- tempfile(fileext = ".html")
html <- div(
div(
div(
div(
div(
"Hello"
)
)
)
)
)
get_pandoc_html <- function(html, file, title = "test", ...) {
write_md_for_pandoc(html, file, title = title, ...)
pandoc_self_contained_html(file, file)
readLines(file)
}
lines <- get_pandoc_html(html, file)
expect_false(any(grepl("<pre", lines)))
lines <- get_pandoc_html(html, file, use_raw_attr = FALSE)
expect_false(any(grepl("<pre", lines)))
})
|