-
Notifications
You must be signed in to change notification settings - Fork 334
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
Allow disabling the wrapping of \dontrun{}
blocks with if (FALSE) {}
in example sections
#2752
Comments
It's not clear to me what you're advocating for. Hiding the blocks completely? I'm guess not sure what you mean by "turned off". |
I’d recommend using a different technique like |
|
and |
You should use a real condition that evaluates to |
What would that be? |
Presumably you have some idea of when |
In short, it won't ever, because the functions in our class require a live connection to an actual database, for which we don't want to put credentials in our package examples. |
I guess I'm confused as to why pkgdown wants to add this whole |
@hadley Am I misunderstanding something about how these example blocks work, is pkgdown actually evaluating the code when it generates the site? |
Yes, pkgdown runs all the examples. |
We use
\dontrun{...}
in all of our examples, which require database connections or otherwise should not be automatically run when building our package docs. In R or Rstudio, these unfortunately render as## Not run:
...## End(Not run)
, which at least renders in an easily-ignorable gray. However, pkgdown renders the tags asif (FALSE) {...}
, which I think clutters up the page to very little benefit and looks kind of ugly. So, it would be nice if this could be turned off.The text was updated successfully, but these errors were encountered: