-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The snippet help(...)
inside a code tag breaks build_site()
#1471
Comments
Actually I just noticed that the stack trace had changed slightly for 1.6.1.9000, since the relevant functions are now found in the ‘downlit’ package.
|
OK, after a bit of poking the obvious issue is that the auto-linking code, not expecting non-standard index <- topic_index(package)
if (has_name(index, topic)) {
index[[topic]] And this in turn executes But the more fundamental problem is still that auto-linking is over-eager here, and is interpreting any mention of any function called |
\code{help(...)}
inside a ‘roxygen2’ comment breaks build_site()help(...)
inside a code tag breaks build_site()
I’ve adjusted the title to reflect the fact that this problem exists for all parts of the site touched by the auto-linker, not just the documentation. Having |
Moved to downlit: r-lib/downlit#77 |
Reprex
Expected output
A working package page is generated.
Actual output
Error message:
The same error message is also shown for slight variations of the ‘roxygen2’ comment above, for instance
\code{help(a-b)}
. What seemingly triggers the behaviour is an arbitrary (but valid) R expression inside ahelp
call inside\code{…}
. Conversely, a single identifier (e.g.\code{help(a)}
) works.For context, this bug manifests in a package that provides (and exports) an own function called
help
; sohelp
here doesn’t refer toutils::help
— not that it should matter in this case..Last.error.trace
sessionInfo()
(I also tried this with the dev version 1.6.1.9000 … same issue.)
The text was updated successfully, but these errors were encountered: