diff --git a/autotests/folding/test.Rd.fold b/autotests/folding/test.Rd.fold --- a/autotests/folding/test.Rd.fold +++ b/autotests/folding/test.Rd.fold @@ -6,14 +6,15 @@ \title{Foo} \description{ We have a list - \itemize error{ + \itemize{ \item foo, \item bar. } Also a table: \tabular{lr}{ foo \tab \code{foo} \cr bar \tab \preformatted{bar} } + \samp error{code} } \section{Section}{ Escaped braces don't need balance \} @@ -25,19 +26,25 @@ } \usage{ foo(a, b = default) +\method{[}{foo}(x, \dots) } \newcommand{\macro}{Test#1} \arguments{ - \item{a}{\if{html}{π =} \Sexpr[stage=build]error{4*atan(1)}} - \item{b}{\macro{text} \link[pkg:bar]{fooo}} + \item{a}{\if{html}{π =} \Sexpr[stage=build]{4*atan(1)}} + \item{\dots}{\macro{text} \link[pkg:bar]{fooo}} +} +\value{ + Return a \code{\link{foo}}. } \seealso{ \code{\link{bar}} } \examples{ # R comment % Rdoc comment foo(1) +\donttest{foo(2)} +\dontrun{foo(3)} for (i in 1:10) foo(i) } diff --git a/autotests/html/test.Rd.html b/autotests/html/test.Rd.html --- a/autotests/html/test.Rd.html +++ b/autotests/html/test.Rd.html @@ -5,21 +5,22 @@
 % Single-line comment
-\name{foo}
+\name{foo}
 #ifdef unix
 \alias{bar}
 #endif ignored
 \title{Foo}
 \description{
     We have a list
-    \itemize error{
+    \itemize{
         \item foo,
         \item bar.
     }
     Also a table: \tabular{lr}{
-        foo \tab \code{foo} \cr
+        foo \tab \code{foo} \cr
         bar \tab \preformatted{bar}
     }
+    \samp error{code}
 }
 \section{Section}{
     Escaped braces don't need balance \}
@@ -31,21 +32,27 @@
 }
 \usage{
 foo(a, b = default)
+\method{[}{foo}(x, \dots)
 }
 \newcommand{\macro}{Test#1}
 \arguments{
-  \item{a}{\if{html}{π =} \Sexpr[stage=build]error{4*atan(1)}}
-  \item{b}{\macro{text} \link[pkg:bar]{fooo}}
+  \item{a}{\if{html}{π =} \Sexpr[stage=build]{4*atan(1)}}
+  \item{\dots}{\macro{text} \link[pkg:bar]{fooo}}
+}
+\value{
+  Return a \code{\link{foo}}.
 }
 \seealso{
-  \code{\link{bar}}
+  \code{\link{bar}}
 }
 \examples{
 # R comment
 % Rdoc comment
 foo(1)
+\donttest{foo(2)}
+\dontrun{foo(3)}
 for (i in 1:10)
     foo(i)
 }
-\keyword{foo}
+\keyword{foo}
 
diff --git a/autotests/input/test.Rd b/autotests/input/test.Rd --- a/autotests/input/test.Rd +++ b/autotests/input/test.Rd @@ -6,14 +6,15 @@ \title{Foo} \description{ We have a list - \itemize error{ + \itemize{ \item foo, \item bar. } Also a table: \tabular{lr}{ foo \tab \code{foo} \cr bar \tab \preformatted{bar} } + \samp error{code} } \section{Section}{ Escaped braces don't need balance \} @@ -25,19 +26,25 @@ } \usage{ foo(a, b = default) +\method{[}{foo}(x, \dots) } \newcommand{\macro}{Test#1} \arguments{ - \item{a}{\if{html}{π =} \Sexpr[stage=build]error{4*atan(1)}} - \item{b}{\macro{text} \link[pkg:bar]{fooo}} + \item{a}{\if{html}{π =} \Sexpr[stage=build]{4*atan(1)}} + \item{\dots}{\macro{text} \link[pkg:bar]{fooo}} +} +\value{ + Return a \code{\link{foo}}. } \seealso{ \code{\link{bar}} } \examples{ # R comment % Rdoc comment foo(1) +\donttest{foo(2)} +\dontrun{foo(3)} for (i in 1:10) foo(i) } diff --git a/autotests/reference/test.Rd.ref b/autotests/reference/test.Rd.ref --- a/autotests/reference/test.Rd.ref +++ b/autotests/reference/test.Rd.ref @@ -1,19 +1,20 @@ % Single-line comment
-
\name
{foo}
+
\name
{foo}
#ifdef unix
\alias
{bar}
#endif ignored
\title
{Foo}
\description
{
We have a list
- \itemize error{
+ \itemize{
\item foo,
\item bar.
}
Also a table: \tabular{lr}{
- foo \tab \code{foo} \cr
+ foo \tab \code{foo} \cr
bar \tab \preformatted{bar}
}
+ \samp error{code}
}
\section
{Section}{
Escaped braces don't need balance \}
@@ -25,20 +26,26 @@ }
\usage
{
foo(a, b = default)
+\method{[}{foo}(x, \dots)
}
\newcommand{\macro}{Test#1}
\arguments
{
- \item{a}{\if{html}{π =} \Sexpr[stage=build]error{4*atan(1)}}
- \item{b}{\macro{text} \link[pkg:bar]{fooo}}
+ \item{a}{\if{html}{π =} \Sexpr[stage=build]{4*atan(1)}}
+ \item{\dots}{\macro{text} \link[pkg:bar]{fooo}}
+}
+
\value
{
+ Return a \code{\link{foo}}.
}
\seealso
{
- \code{\link{bar}}
+ \code{\link{bar}}
}
\examples
{
# R comment
% Rdoc comment
foo(1)
-for (i in 1:10)
- foo(i)
+\donttest{foo(2)}
+\dontrun{foo(3)}
+for (i in 1:10)
+ foo(i)
}
-
\keyword
{foo}
+
\keyword
{foo}
diff --git a/data/syntax/rdoc.xml b/data/syntax/rdoc.xml --- a/data/syntax/rdoc.xml +++ b/data/syntax/rdoc.xml @@ -1,6 +1,6 @@ - @@ -16,16 +16,18 @@ FALSE + + \docType + \encoding + \keyword + \name + \author \concept \description \details - \docType - \encoding \format - \keyword - \name \note \references \seealso @@ -39,7 +41,7 @@ \newcommand \renewcommand - + \examples \usage @@ -70,7 +72,6 @@ \command \dfn \dQuote - \email \emph \file \linkS4class @@ -96,6 +97,9 @@ \enumerate \itemize + + \item + \describe @@ -105,42 +109,62 @@ \code - \dontshow - \donttest - \testonly - \dontrun + \email \env \kbd \option \out \preformatted \samp - \special \url + \verb \deqn \eqn \tabular \href + \figure - + \link - + \Sexpr + + \dontrun + \special + \v + \var + + + \method + \S3method + \S4method + + + \l + \link + + + \dontshow + \donttest + \testonly + + + - + @@ -164,54 +188,66 @@ + + + + - + - + - + - + - + + + + + + + + + - + - + - + - + - - - + + + - + - - - + + + - + @@ -230,42 +266,65 @@ - - + + - + + - + + + + + + + + - + + - + + + + + + + - - - - + + + + + + + + + + + + @@ -276,15 +335,17 @@ - + - + + - + - + + @@ -303,18 +364,19 @@ + - + - +