Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use double-tilde for strikethrough in Markdown tests #4144

Merged
merged 3 commits into from
Oct 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions tests/testthat/test-inline-markdown.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")
cpsievert marked this conversation as resolved.
Show resolved Hide resolved
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)
cpsievert marked this conversation as resolved.
Show resolved Hide resolved
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)
cpsievert marked this conversation as resolved.
Show resolved Hide resolved
expect_equal(html, HTML("<p data-sourcepos=\"1:1-1:15\">a ~~paragraph~~</p>\n"))
})

test_that("Multiline markdown works properly", {
Expand Down
Loading