Debian Codegraph @

man/raw_text.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/fuse.R
3 \name{raw_text}
4 \alias{raw_text}
5 \title{Mark a character vector as raw output}
6 \usage{
7 raw_text(x, format = NULL)
8 }
9 \arguments{
10 \item{x}{A character vector (each element will be treated as a line).}
11
12 \item{format}{An output format name, e.g., \code{html} or \code{latex}. If provided,
13 \code{x} will be wrapped in a fenced code block, e.g., \verb{ ```\{=html\}}.}
14 }
15 \value{
16 A character vector with a special class to indicate that it should be
17 treated as raw output.
18 }
19 \description{
20 This function should be called inside a code chunk, and its effect is the
21 same as the chunk option \code{results = "asis"}. The input character vector will
22 be written verbatim to the output (and interpreted as Markdown).
23 }
24 \examples{
25 litedown::raw_text(c("**This**", "_is_", "[Markdown](#)."))
26 litedown::raw_text("<b>Bold</b>", "html")
27 litedown::raw_text("\\\\textbf{Bold}", "latex")
28 }