r-lib / roxygen2

Generate R package documentation from inline R comments
https://roxygen2.r-lib.org
Other
594 stars 233 forks source link

Should using a custom rd_family_title automatically add the colon if missing? #1656

Open maelle opened 2 months ago

maelle commented 2 months ago

In https://roxygen2.r-lib.org/articles/index-crossref.html?q=rd_family_title#family

list(
  rd_family_title = list(aggregations = "Aggregation functions")
)

which won't add a colon

https://github.com/r-lib/roxygen2/blob/9652d15221109917d46768e836eaf55e33c21633/R/rd-family.R#L14-L35

Not having a colon looks surprising (although I never noticed its absence myself :sweat_smile: ) but adding it to the options seems a bit cumbersome, so I wonder whether roxygen2 should add the colon when it's not in the rd_family_title.

Something that comes to mind is how pkgdown removes the slash at the end of the URL from the configuration file if it's present https://github.com/r-lib/pkgdown/blob/ee72108bc3a9827dcf313817525652dbd9d4284d/R/package.R#L74-L77

maelle commented 2 months ago

Related #1628