Skip to content

Commit

Permalink
Port r54863 from trunk
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/branches/R-2-12-branch@54865 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
murdoch committed Mar 18, 2011
1 parent ff3e199 commit 710a3f9
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doc/NEWS.Rd
Expand Up @@ -41,6 +41,9 @@
\item Non-ascii characters in the titles of help pages were
not rendered properly in some locales, and could cause errors
or warnings.

\item \code{checkRd()} gave a spurious error if the \code{\\href}
macro was used.
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions src/library/tools/R/RdConv2.R
Expand Up @@ -696,6 +696,11 @@ checkRd <- function(Rd, defines=.Platform$OS.type, stages="render",
if (tag == "\\ifelse")
checkContent(block[[3L]])
},
"\\href" = {
if (!identical(RdTags(block[[1L]]), "VERB"))
stopRd(block, Rdfile, "First argument to \\href must be verbatim URL")
checkContent(block[[2L]], tag)
},
"\\out" = {
tags <- RdTags(block)
if (!all(tags == "VERB"))
Expand Down
4 changes: 4 additions & 0 deletions src/main/gramRd.c
Expand Up @@ -3812,6 +3812,10 @@ struct {
char *name;
int token;
}

/* When adding keywords here, make sure all the handlers
are also modified: checkRd, Rd2HTML, Rd2latex, Rd2txt, any other new ones... */

static keywords[] = {
/* These sections contain Latex-like text */

Expand Down
4 changes: 4 additions & 0 deletions src/main/gramRd.y
Expand Up @@ -985,6 +985,10 @@ struct {
char *name;
int token;
}

/* When adding keywords here, make sure all the handlers
are also modified: checkRd, Rd2HTML, Rd2latex, Rd2txt, any other new ones... */

static keywords[] = {
/* These sections contain Latex-like text */

Expand Down

0 comments on commit 710a3f9

Please sign in to comment.