You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If one has a DOI like <doi:10.1175/1520-0469(1981)038<1179:TSLROA>2.0.CO;2> in the package DESCRIPTION one needs to URLencode it for R CMD check to pass. I.e. "doi:10.1175/1520-0469(1981)038%3C1179:TSLROA%3E2.0.CO;2"
The problem is that the URL encoded version of the URL then gets written in the package-level manual page. And when going from Rd to HTML, the DOI is truncated after the "%".
Could roxygen2 transform DOIs to URLs and unencode their text?
The text was updated successfully, but these errors were encountered:
Hi! I am exploring a PR for solving #1265 and I just came across this issue. Just for information, I found the following on https://github.com/wch/r-source/:
dois<-character()
pattern<-"<(DOI|doi):([^>]*)>"if(!is.na(v<-meta["Description"])) {
m<- gregexpr(pattern, v)
dois<- c(dois, .gregexec_at_pos(pattern, v, m, 3L))
}
## DOI names may contain ">", but we need this as a delimiter when## writing the names in <doi:name> style. So at least ">" and hence## also "%" must be percent encoded ...
doi_db(utils::URLdecode(dois), rep.int("DESCRIPTION", length(dois)))
From https://stat.ethz.ch/pipermail/r-package-devel/2020q4/006236.html
If one has a DOI like <doi:10.1175/1520-0469(1981)038<1179:TSLROA>2.0.CO;2> in the package DESCRIPTION one needs to URLencode it for R CMD check to pass. I.e. "doi:10.1175/1520-0469(1981)038%3C1179:TSLROA%3E2.0.CO;2"
The problem is that the URL encoded version of the URL then gets written in the package-level manual page. And when going from Rd to HTML, the DOI is truncated after the "%".
Could roxygen2 transform DOIs to URLs and unencode their text?
The text was updated successfully, but these errors were encountered: