File: as_html.R

package info (click to toggle)
r-cran-sass 0.3.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 4,012 kB
  • sloc: cpp: 29,639; ansic: 962; sh: 668; makefile: 321; perl: 56
file content (8 lines) | stat: -rw-r--r-- 209 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8


# add class html and attr('html') <- TRUE to spoof htmltoolts::HTML(css) output
as_html <- function(x, extra_class = NULL) {
  class(x) <- c(extra_class, "html", "character")
  attr(x, "html") <- TRUE
  x
}