mirror of
https://github.com/rstudio/shiny.git
synced 2026-01-10 07:28:01 -05:00
Use double-tilde for strikethrough in Markdown tests (#4144)
* Use double-tilde for strikethrough in Markdown tests
The current dev version of commonmark has disabled single tilde for strikethrough: https://github.com/r-lib/commonmark/pull/33 Using double-tilde will make it consistent with Pandoc's Markdown (where single-tilde is for subscripts).
* Skip tests if commonmark is outdated
* Revert "Skip tests if commonmark is outdated"
This reverts commit 97bee20863.
---------
Co-authored-by: Carson Sievert <cpsievert1@gmail.com>
This commit is contained in:
@@ -11,18 +11,18 @@ test_that("HTML has correct attributes", {
|
||||
})
|
||||
|
||||
test_that("Github extensions are on by default", {
|
||||
html <- markdown("a ~paragraph~ with a link: https://example.com")
|
||||
html <- markdown("a ~~paragraph~~ with a link: https://example.com")
|
||||
expect_equal(html, HTML("<p>a <del>paragraph</del> with a link: <a href=\"https://example.com\">https://example.com</a></p>\n"))
|
||||
})
|
||||
|
||||
test_that("Github extensions can be disabled", {
|
||||
html <- markdown("a ~paragraph~", extensions = FALSE)
|
||||
expect_equal(html, HTML("<p>a ~paragraph~</p>\n"))
|
||||
html <- markdown("a ~~paragraph~~", extensions = FALSE)
|
||||
expect_equal(html, HTML("<p>a ~~paragraph~~</p>\n"))
|
||||
})
|
||||
|
||||
test_that("Additional options are respected", {
|
||||
html <- markdown("a ~paragraph~", extensions = FALSE, sourcepos = TRUE)
|
||||
expect_equal(html, HTML("<p data-sourcepos=\"1:1-1:13\">a ~paragraph~</p>\n"))
|
||||
html <- markdown("a ~~paragraph~~", extensions = FALSE, sourcepos = TRUE)
|
||||
expect_equal(html, HTML("<p data-sourcepos=\"1:1-1:15\">a ~~paragraph~~</p>\n"))
|
||||
})
|
||||
|
||||
test_that("Multiline markdown works properly", {
|
||||
|
||||
Reference in New Issue
Block a user