tests/testthat/test-6.10-raw-html.R

library(testthat)
library(gluedown)
library(rvest)
library(glue)

test_that("md_convert can optionally disallow certain HTML", {
  "foo" %>%
    md_bold() %>%
    md_convert(disallow = FALSE) %>%
    read_html() %>%
    html_node("strong") %>%
    html_text() %>%
    expect_equal("foo")
})

Try the gluedown package in your browser

Any scripts or data that you put into this service are public.

gluedown documentation built on Nov. 2, 2023, 5:48 p.m.