Skip to content

Commit 7b17ef8

Browse files
committed
Use conditionMessage in warning fun
1 parent fde03f7 commit 7b17ef8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

R/format.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ format.BibEntry <- function(x, style = .BibOptions$style,
4545
## macro.env <- tools::loadRdMacros(file.path(R.home("share"), "Rd",
4646
## "macros", "system.Rd"))
4747
warnWithKey <- function(w){
48-
msg <- sub("^.*[[:alnum:]][:] ", "", w)
49-
msg <- sub("\\n$", "", msg)
48+
msg <- sub("^.*[[:alnum:]][:] ", "", conditionMessage(w))
5049
msg <- paste0(y$key, ": ", msg)
5150
warning(msg, call. = FALSE)
5251
invokeRestart("muffleWarning")

0 commit comments

Comments
 (0)