html_code_block(txt, class = c("not-fansi", "plain"))

<PRE class="not-fansi plain"><CODE>day > night
hello world</CODE></PRE>

[1] "<PRE class=\"not-fansi plain\"><CODE>day > night\nhello world</CODE></PRE>"

Argument `class` must be character, is NULL.

Error in html_code_block(txt, class = NULL) : 
  Argument `class` must be character, is NULL.

[1] "h&e'l\"lo"      "wor&lt;ld&gt;s" NA               ""

[1] "h&amp;e'l\"lo"  "wor&lt;ld&gt;s" NA               ""

html_esc(c("h&e'l\"lo", "wor<ld>s", NA, ""), character())

Argument `what` must be scalar character and not NA.

Error in html_esc(c("h&e'l\"lo", "wor<ld>s", NA, ""), character()) : 
  Argument `what` must be scalar character and not NA.

html_esc(c("h&e'l\"lo", "wor<ld>s", NA, ""), NA_character_)

Error in html_esc(c("h&e'l\"lo", "wor<ld>s", NA, ""), NA_character_) : 
  Argument `what` must be scalar character and not NA.

Argument `what` must be character, is integer.

Error in html_esc(c("h&e'l\"lo", "wor<ld>s", NA, ""), 1:5) : 
  Argument `what` must be character, is integer.

Argument `what` may only contain ASCII characters "&", "<", ">", "'", or "\"".

Error in html_esc(c("h&e'l\"lo", "wor<ld>s", NA, ""), "'x><") : 
  Argument `what` may only contain ASCII characters "&", "<", ">", "'", or "\"".

h.1 <- list(set = function(...) cat("Set hooks: ", names(list(...)), 
    "\n"), get = function(...) function(...) "old.hook")

h.2 <- list(set = function(...) cat("Set hooks: ", names(list(...)), 
    "\n"), get = function(...) "not a function")

h.3 <- list(set = function(...) cat("Set hooks: ", names(list(...)), 
    "\n"), get = function(...) stop("error in get"))

h.4 <- list(set = function(...) stop("error in set"), get = function(...) function() "old.hook")

Argument `hooks` does not appear to be `knitr::knit_hooks`.

Error in set_knit_hooks(list(1, 2)) : 
  Argument `hooks` does not appear to be `knitr::knit_hooks`.

Error in set_knit_hooks(list(function() NULL, function() NULL)) : 
  Argument `hooks` does not appear to be `knitr::knit_hooks`.