Skip to content

Commit ac56f73

Browse files
author
hornik
committed
Tweaks.
git-svn-id: https://svn.r-project.org/R/trunk@87898 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 32c4442 commit ac56f73

File tree

1 file changed

+11
-2
lines changed
  • src/library/tools/R

1 file changed

+11
-2
lines changed

src/library/tools/R/Rd.R

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -745,8 +745,12 @@ function(x)
745745
recurse <- function(e) {
746746
if(!is.null(tag <- attr(e, "Rd_tag"))
747747
&& tag %in% c("\\dontdiff", "\\dontshow", "\\donttest",
748-
"\\testonly"))
748+
"\\testonly")) {
749+
e <- c(list(tagged("\n", "RCODE")),
750+
e,
751+
list(tagged("\n", "RCODE")))
749752
attr(e, "Rd_tag") <- "Rd"
753+
}
750754
if(is.list(e)) {
751755
structure(lapply(e[is.na(match(RdTags(e), "\\dontrun"))],
752756
recurse),
@@ -755,7 +759,12 @@ function(x)
755759
else e
756760
}
757761

758-
.Rd_deparse(recurse(x), tag = FALSE)
762+
y <- recurse(x)
763+
attr(y, "Rd_tag") <- "Rd"
764+
y <- as.character.Rd(y)
765+
y[y %in% c("\\dots", "\\ldots")] <- "..."
766+
y <- psub("(?<!\\\\)\\\\([%{])", "\\1", y)
767+
paste(y, collapse = "")
759768
}
760769

761770
### * .Rd_get_methods_description_table

0 commit comments

Comments
 (0)