From 5843a9d940a54ff67ff6627182ec8386c9bf5c78 Mon Sep 17 00:00:00 2001 From: Garrick Aden-Buie Date: Tue, 5 Sep 2023 15:01:20 -0400 Subject: [PATCH] docs: Avoid unescaped latex warning with correct formatting --- R/epoxy_transform_inline.R | 2 +- man/epoxy_transform_inline.Rd | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/R/epoxy_transform_inline.R b/R/epoxy_transform_inline.R index 1bec8f65..fae88e5b 100644 --- a/R/epoxy_transform_inline.R +++ b/R/epoxy_transform_inline.R @@ -383,7 +383,7 @@ roxy_inline_params <- function() { } # default is a function call, maybe with arguments link <- sub("\\(.*\\)$", "", expr) - return(sprintf("[%s][%s]", expr, link)) + return(sprintf("[`%s`][%s]", expr, link)) }) extras <- epoxy_inline_aliases diff --git a/man/epoxy_transform_inline.Rd b/man/epoxy_transform_inline.Rd index 058008da..18f68fb7 100644 --- a/man/epoxy_transform_inline.Rd +++ b/man/epoxy_transform_inline.Rd @@ -54,7 +54,7 @@ the current transformation. In nearly all cases, you can let \item{.decr}{The function to apply to \code{x} when the template is \verb{\{.decr x\}}. Default is \code{function(x) sort(x, decreasing = TRUE)}.} -\item{.bytes}{The function to apply to \code{x} when the template is \verb{\{.bytes x\}}. Default is \link[scales:label_bytes]{scales::label_bytes()}.} +\item{.bytes}{The function to apply to \code{x} when the template is \verb{\{.bytes x\}}. Default is \code{\link[scales:label_bytes]{scales::label_bytes()}}.} \item{.date}{The function to apply to \code{x} when the template is \verb{\{.date x\}}. Default is \code{function(x) format(x, format = "\%F")}.} @@ -62,19 +62,19 @@ the current transformation. In nearly all cases, you can let \item{.datetime}{The function to apply to \code{x} when the template is \verb{\{.datetime x\}} or \verb{\{.dttm x\}}. Default is \code{function(x) format(x, format = "\%F \%T")}.} -\item{.dollar}{The function to apply to \code{x} when the template is \verb{\{.dollar x\}}. Default is \link[scales:label_dollar]{scales::label_dollar(prefix = engine_pick("$", "$", "\\$"))}.} +\item{.dollar}{The function to apply to \code{x} when the template is \verb{\{.dollar x\}}. Default is \code{\link[scales:label_dollar]{scales::label_dollar(prefix = engine_pick("$", "$", "\\\\$"))}}.} -\item{.number}{The function to apply to \code{x} when the template is \verb{\{.number x\}} or \verb{\{.num x\}}. Default is \link[scales:label_number]{scales::label_number()}.} +\item{.number}{The function to apply to \code{x} when the template is \verb{\{.number x\}} or \verb{\{.num x\}}. Default is \code{\link[scales:label_number]{scales::label_number()}}.} -\item{.comma}{The function to apply to \code{x} when the template is \verb{\{.comma x\}}. Default is \link[scales:label_number]{scales::label_comma()}.} +\item{.comma}{The function to apply to \code{x} when the template is \verb{\{.comma x\}}. Default is \code{\link[scales:label_number]{scales::label_comma()}}.} -\item{.ordinal}{The function to apply to \code{x} when the template is \verb{\{.ordinal x\}}. Default is \link[scales:label_ordinal]{scales::label_ordinal()}.} +\item{.ordinal}{The function to apply to \code{x} when the template is \verb{\{.ordinal x\}}. Default is \code{\link[scales:label_ordinal]{scales::label_ordinal()}}.} -\item{.percent}{The function to apply to \code{x} when the template is \verb{\{.percent x\}} or \verb{\{.pct x\}}. Default is \link[scales:label_percent]{scales::label_percent(suffix = engine_pick("\%", "\%", "\\\%"))}.} +\item{.percent}{The function to apply to \code{x} when the template is \verb{\{.percent x\}} or \verb{\{.pct x\}}. Default is \code{\link[scales:label_percent]{scales::label_percent(suffix = engine_pick("\%", "\%", "\\\\\%"))}}.} -\item{.pvalue}{The function to apply to \code{x} when the template is \verb{\{.pvalue x\}}. Default is \link[scales:label_pvalue]{scales::label_pvalue()}.} +\item{.pvalue}{The function to apply to \code{x} when the template is \verb{\{.pvalue x\}}. Default is \code{\link[scales:label_pvalue]{scales::label_pvalue()}}.} -\item{.scientific}{The function to apply to \code{x} when the template is \verb{\{.scientific x\}}. Default is \link[scales:label_scientific]{scales::label_scientific()}.} +\item{.scientific}{The function to apply to \code{x} when the template is \verb{\{.scientific x\}}. Default is \code{\link[scales:label_scientific]{scales::label_scientific()}}.} \item{.uppercase}{The function to apply to \code{x} when the template is \verb{\{.uppercase x\}} or \verb{\{.uc x\}}. Default is \code{\link[=toupper]{toupper()}}.}