context("format_nonbreaking")
test_that("spaces", {
x <- c("foo bar baz")
expect_equal(
format_nonbreaking(x),
str_c("foo", "bar", "baz", sep = "\u00A0"))
})
test_that("hyphens", {
x <- c("foo-bar-baz")
expect_equal(
format_nonbreaking(x),
str_c("foo", "bar", "baz", sep = "\u2011"))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.