Skip to content

Commit

Permalink
Add hint in warning about title spanning multiple lines (#1000)
Browse files Browse the repository at this point in the history
  • Loading branch information
maelle authored Mar 10, 2020
1 parent e86cebf commit e7433fc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# roxygen2 (development version)

* The warning for section titles spanning multiple lines now includes the hint
"Did you forget a colon (:) at the end of the title?" (@maelle, #994).

* Can now document objects created with `delayedAssign()` by forcing
evaluation at documentation time (#1041)

Expand Down
5 changes: 4 additions & 1 deletion R/rd-section.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ roxy_tag_rd.roxy_tag_section <- function(x, base_path, env) {
title <- str_split(pieces[1], "\n")[[1]]

if (length(title) > 1) {
roxy_tag_warning(x, "Section title spans multiple lines")
roxy_tag_warning(x, paste0(
"Section title spans multiple lines.\n",
"Did you forget a colon (:) at the end of the title?"
))
return()
}

Expand Down

0 comments on commit e7433fc

Please # to comment.