Skip to content

Commit 387a1dc

Browse files
author
hornik
committed
Need to link to installed news file for static help.
git-svn-id: https://svn.r-project.org/R/trunk@87336 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent bf37dbc commit 387a1dc

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

src/library/tools/R/dynamicHelp.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ httpd <- function(path, query, ...)
390390
demosRegexp <- "^/library/([^/]*)/demo/([^/]*)$"
391391
DemoRegexp <- "^/library/([^/]*)/Demo/([^/]*)$"
392392
ExampleRegexp <- "^/library/([^/]*)/Example/([^/]*)$"
393-
newsRegexp <- "^/library/([^/]*)/NEWS$"
393+
newsRegexp <- "^/library/([^/]*)/NEWS([.](Rd|md))?$"
394394
figureRegexp <- "^/library/([^/]*)/(help|html)/figures/([^/]*)$"
395395
sessionRegexp <- "^/session/"
396396
packageIndexRegexp <- "^/library/([^/]*)$"

src/library/tools/R/install.R

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2859,12 +2859,14 @@ if(FALSE) {
28592859
cat('<li><a href="../doc/index.html">User guides, package vignettes and other documentation.</a></li>\n', file=conn)
28602860
if (file.exists(file.path(outDir, "demo")))
28612861
cat('<li><a href="../demo">Code demos</a>. Use <a href="../../utils/help/demo">demo()</a> to run them.</li>\n',
2862-
sep = "", file=conn)
2863-
if (any(file.exists(file.path(outDir,
2864-
c("NEWS", "NEWS.Rd", "NEWS.md")))))
2865-
## FIXME: link target needs adjustment for static help
2866-
cat('<li><a href="../NEWS">Package NEWS</a>.</li>\n',
2867-
sep = "", file=conn)
2862+
sep = "", file=conn)
2863+
for(nfile in c("NEWS", "NEWS.Rd", "NEWS.md")) {
2864+
if(file.exists(file.path(outDir, nfile))) {
2865+
cat('<li><a href="../', nfile, '">Package NEWS</a>.</li>\n',
2866+
sep = "", file=conn)
2867+
break
2868+
}
2869+
}
28682870

28692871
cat('</ul>\n\n<h2>Help Pages</h2>\n\n\n',
28702872
sep ="", file = conn)

0 commit comments

Comments
 (0)