Skip to content

Commit

Permalink
Tweaks.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/trunk@87107 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
hornik committed Sep 9, 2024
1 parent 224f6d1 commit 55bdc2b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/library/tools/R/Rd2HTML.R
Original file line number Diff line number Diff line change
Expand Up @@ -1455,7 +1455,7 @@ function(dir)
if(a) {
## URL regexp as in .DESCRIPTION_to_latex(). CRAN uses
## <(URL: *)?((https?|ftp)://[^[:space:]]+)[[:space:]]*>
## ([^>\"?])((https?|ftp)://[[:alnum:]/.:@+\\_~%#?=&;,-]+[[:alnum:]/])
## ([[:space:]])((https?|ftp)://[[:alnum:]/.:@+\\_~%#?=&;,-]+[[:alnum:]/])
## (also used in toRd.citation().
x <- trfm("&lt;(http://|ftp://|https://)([^[:space:],>]+)&gt;",
"<a href=\"\\1%s\">\\1\\2</a>",
Expand Down
2 changes: 1 addition & 1 deletion src/library/tools/R/toHTML.R
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ function(x, header = TRUE, ...)
## Need to ignore results of the above translation ...
## Regexp based on Perl HTML::TextToHTML, note that the dash
## must be last ...
s <- .gsub_with_transformed_matches("([^>\"?])((https?|ftp)://[[:alnum:]/.:@+\\_~%#?=&;,-]+[[:alnum:]/])",
s <- .gsub_with_transformed_matches("([[:space:]])((https?|ftp)://[[:alnum:]/.:@+\\_~%#?=&;,-]+[[:alnum:]/])",
"\\1<a href=\"%s\">\\2</a>",
s,
urlify,
Expand Down

0 comments on commit 55bdc2b

Please sign in to comment.