Skip to content

Commit 71a2e96

Browse files
author
smeyer
committed
tweak c84551
git-svn-id: https://svn.r-project.org/R/trunk@87435 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 5e4b78c commit 71a2e96

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/library/tools/R/RdConv2.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ processRdChunk <- function(code, stage, options, env, macros)
213213
res <- character(0)
214214

215215
tags <- RdTags(code)
216-
if (length(bad <- setdiff(tags, c("RCODE", "COMMENT"))))
216+
if (length(bad <- setdiff(tags, c("RCODE", "TEXT", "COMMENT"))))
217217
## also USERMACROs are currently not supported inside \Sexpr{}
218218
warnRd(code, Rdfile, "\\Sexpr expects R code; found ",
219219
paste0(sQuote(bad), collapse = ", "))
@@ -379,6 +379,7 @@ processRdIfdefs <- function(blocks, defines)
379379
tagged(list(
380380
tagged(paste(tag, target, "not active"),
381381
"COMMENT", attr(block, "srcref")),
382+
## converters expect (and drop) newline from COMMENT
382383
tagged("\n",
383384
"TEXT", attr(block, "srcref"))
384385
), "#expanded")

tests/reg-packages.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,8 @@ stopifnot(exprs = {
478478
any(grepl("See Also:", helptxt, fixed = TRUE)) == (.Platform$OS.type == "windows")
479479

480480
## post-build macros can contain conditional defines
481-
tools::Rd2txt(installedRdDB[["nestedDefinesOK.Rd"]])
481+
tools::Rd2txt(installedRdDB[["nestedDefinesOK.Rd"]],
482+
options = list(underline_titles = FALSE))
482483
deparsedLines <- as.character(installedRdDB[["nestedDefinesOK.Rd"]])
483484
stopifnot(("unix" %in% deparsedLines) == (.Platform$OS.type == "unix"),
484485
("windows" %in% deparsedLines) == (.Platform$OS.type == "windows"))

0 commit comments

Comments
 (0)