context("line break cleanup")
test_that("duplicate and trailing new line sequences removed", {
vecWithNewlines <- c("dog\n\ncat\n\n\npig\n")
expect_no_match(
squish_newlines(vecWithNewlines),"\n\n"
)
expect_no_match(
squish_newlines(vecWithNewlines),"\\n$"
)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.