File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed
Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -475,8 +475,24 @@ function(x, kind)
475475 x <- x [RdTags(x ) == sprintf(" \\ %s" , kind )]
476476 if (! length(x ))
477477 character ()
478- else
478+ else {
479+ # # <NOTE>
480+ # # WRE says that
481+ # # Each @code{\concept} entry should give a @emph{single}
482+ # # index term (word or phrase), and not use any Rd markup.
483+ # # but at least for now we use \I{...} for spell checking.
484+ if (kind == " concept" )
485+ x <- lapply(x , function (e ) {
486+ if ((length(e ) > 1L ) &&
487+ identical(attr(e [[1L ]], " Rd_tag" ), " USERMACRO" ) &&
488+ identical(attr(e [[1L ]], " macro" ), " \\ I" ))
489+ e [- 1L ]
490+ else
491+ e
492+ })
493+ # # </NOTE>
479494 unique(trimws(vapply(x , paste , " " , collapse = " \n " )))
495+ }
480496}
481497
482498# ## * .Rd_keywords_auto
@@ -834,7 +850,7 @@ function(x)
834850 tag <- attr(e , " Rd_tag" )
835851 if (identical(tag , " \\ link" )) {
836852 val <- if (length(e )) { # mvbutils has empty links
837- arg <- as.character( e [[ 1L ]] )
853+ arg <- paste(vapply( e , trimws , " " ), collapse = " " )
838854 opt <- attr(e , " Rd_option" )
839855 c(arg , if (is.null(opt )) " " else as.character(opt ))
840856 } else c(" " , " " )
You can’t perform that action at this time.
0 commit comments