r-lib / downlit

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

Make repo_auto_link() part of downlit? #94

Closed maelle closed 3 years ago

maelle commented 3 years ago

pkgdown currently has code for linking issues and usernames. It uses a regular expression to identify issues and usernames.

https://github.com/r-lib/pkgdown/blob/c9e7dde4c5ca066f4a797ff201ead380f702473f/R/repo.R#L36

While not in scope for downlit in the sense of highlighting code, it does link things. :slightly_smiling_face:

Pros if it were to be integrated to downlit:

maelle commented 3 years ago

Sort of related https://github.com/r-lib/pkgdown/issues/1671

If repo_auto_link used tweak_children() I think it'd be easier to implement the feature requested in that issue and not confuse it with something in an URL.

hadley commented 3 years ago

Unfortunately this just feels out of scope for downlit to me; I think we want to keep it pretty tightly scoped to scope.