On line 105, "&\\hellip;" should probably be "…": Index: Rd2HTML.R ==================================================================--- Rd2HTML.R (revision 79833) +++ Rd2HTML.R (working copy) @@ -102,7 +102,7 @@ ## http://htmlhelp.com/reference/html40/entities/symbols.html if(inEqn) { x <- psub("\\\\(Alpha|Beta|Gamma|Delta|Epsilon|Zeta|Eta|Theta|Iota|Kappa|Lambda|Mu|Nu|Xi|Omicron|Pi|Rho|Sigma|Tau|Upsilon|Phi|Chi|Psi|Omega|alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|le|ge|sum|prod)", "&\\1;", x) - x <- psub("\\\\(dots|ldots)", "&\\hellip;", x) + x <- psub("\\\\(dots|ldots)", "…", x) x <- fsub("\\infty", "∞", x) x <- fsub("\\sqrt", "√", x) } The backslash is ignored by gsub(), so no actual bug happens as a result of this. Further checking with w <- makeCodeWalker( call = function(e,w) { if ( grepl('^[gpf]?sub$', as.character(e[[1]])) && grepl('\\', as.character(e[[3]]), fixed=TRUE) ) print(e) else lapply(e, walkCode, w) }, leaf = function(.,..) invisible() ) for (f in list.files( 'R-devel/src/library/tools/R', full = TRUE, pattern = '\\.R$', ignore.case=TRUE )) for (e in parse(f)) invisible(walkCode(e, w)) doesn't reveal any similar typos. -- Best regards, Ivan
Martin Maechler
2021-Jan-16 17:30 UTC
[Rd] r79833 src/library/tools/R/Rd2HTML.R minor typo
Thank you, Ivan, I've updated the source now, Martin> On line 105, "&\\hellip;" should probably be "…": > Index: Rd2HTML.R > ==================================================================> --- Rd2HTML.R (revision 79833) > +++ Rd2HTML.R (working copy) > > > - x <- psub("\\\\(dots|ldots)", "&\\hellip;", x) > + x <- psub("\\\\(dots|ldots)", "…", x) > > > The backslash is ignored by gsub(), so no actual bug happens as a > result of this. > > [............]