downlit icon indicating copy to clipboard operation
downlit copied to clipboard

Should pkgdown protect package names in {} when inside brackets? (formatted as code)

Open strengejacke opened this issue 9 months ago • 1 comments

I have a vignette, where I use {} as "token" indicators. One token is named stars, and pkgdown converts this into a link to the package website, because it happens to be a package name (see https://easystats.github.io/parameters/articles/model_parameters_print.html#changing-style-of-column-output), i.e. instead of {stars}, the vignettes renders it as stars (for reference, the affected line in the rdm file is https://github.com/easystats/parameters/blob/9c16fb2084448bb6063746073c2b2d9fa6e832c1/vignettes/model_parameters_print.Rmd#L264C24-L264C24).

My question is if this should be the desired behaviour, or if automated linking to packages should not be done inside backticks (i.e. when formatted as code)?

strengejacke avatar Sep 29 '23 18:09 strengejacke

It's a downlit feature https://github.com/r-lib/downlit#features (that for some reason I believed didn't work all the time but I didn't write a reprex :sob: https://github.com/r-lib/downlit/issues/158

maelle avatar Oct 02 '23 05:10 maelle