Closed maelle closed 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.
Unfortunately this just feels out of scope for downlit to me; I think we want to keep it pretty tightly scoped to scope.
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:
tweak_children
and therefore use XPath in combination with regex to identify the text to link.lookup::lookup_browse()
.