% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/downlit-html.R
\name{downlit_html_path}
\alias{downlit_html_path}
\alias{downlit_html_node}
\title{Syntax highlight and link an HTML page}
\usage{
downlit_html_path(in_path, out_path, classes = classes_pandoc())

downlit_html_node(x, classes = classes_pandoc())
}
\arguments{
\item{in_path, out_path}{Input and output paths for HTML file}

\item{classes}{A mapping between token names and CSS class names.
Bundled \code{classes_pandoc()} and \code{classes_chroma()} provide mappings
that (roughly) match Pandoc and chroma (used by hugo) classes so you
can use existing themes.}

\item{x}{An \code{xml2::xml_node}}
}
\value{
\code{downlit_html_path()} invisibly returns \code{output_path};
\code{downlit_html_node()} modifies \code{x} in place and returns nothing.
}
\description{
\itemize{
\item Code blocks, identified by \verb{<pre>} tags with class \verb{sourceCode r}
or any \verb{<pre>} tag inside of \verb{<div class='downlit'>}, are
processed with \code{\link[=highlight]{highlight()}}.
\item Inline code, identified by \verb{<code>} tags that contain only text
(and don't have a header tag (e.g. \verb{<h1>}) or \verb{<a>} as an ancestor)
are processed processed with \code{\link[=autolink]{autolink()}}.
}

Use \code{downlit_html_path()} to process an \code{.html} file on disk;
use \code{downlit_html_node()} to process an in-memory \code{xml_node} as part of a
larger pipeline.
}
\examples{
\dontshow{if (rlang::is_installed("xml2")) withAutoprint(\{ # examplesIf}
node <- xml2::read_xml("<p><code>base::t()</code></p>")
node

# node is modified in place
downlit_html_node(node)
node
\dontshow{\}) # examplesIf}
}
