% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/markdown-escaping.R
\name{escape_rd_for_md}
\alias{escape_rd_for_md}
\alias{unescape_rd_for_md}
\title{Escape fragile Rd tags}
\usage{
escape_rd_for_md(text)

unescape_rd_for_md(rd_text, esc_text)
}
\arguments{
\item{text}{Input text. Potentially contains Rd and/or
markdown markup.}

\item{rd_text}{The markdown parsed and interpreted text.}

\item{esc_text}{The original escaped text from
\code{escape_rd_for_md()}.}
}
\value{
\itemize{
\item \code{escape_rd_for_md}: a "safe" version of the input text, where
each fragile Rd tag is replaced by a placeholder. The
original text is added as an attribute for each placeholder.
\item \code{unescape_rd_for_md}: the original Rd text.
}
}
\description{
\code{escape_rd_for_md()} replaces fragile Rd tags with placeholders, to avoid
interpreting them as markdown. \code{unescape_rd_for_md()} puts the original
text back in place of the placeholders after the markdown parsing is done.
The fragile tags are listed in \code{escaped_for_md}.

Some Rd macros are treated specially:
\itemize{
\item For \code{if}, markdown is only allowed in the second argument.
\item For \code{ifelse} markdown is allowed in the second and third arguments.
}
}
\keyword{internal}
