r-lib / downlit

Syntax Highlighting and Automatic Linking
https://downlit.r-lib.org
Other
89 stars 22 forks source link

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

Open strengejacke opened 1 year ago

strengejacke commented 1 year ago

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)?

maelle commented 1 year ago

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