-
Notifications
You must be signed in to change notification settings - Fork 232
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
Format bare operators as code #971
Comments
Well, you can always do
I think. But it makes sense to capture the common operators I guess. Maybe we could also support
to force |
I was thinking the same, it seems like an intuitive extension of the syntax. |
Right. Strictly speaking it is a breaking change, though. |
I think the easiest way is just to add a lookup list for operators, that'll catch 95% of the cases. |
I think part of the problem is that I didn't understand the difference between Verb:
Code:
It seems like the main difference is that code allows linking to other parts of the R documentation. And conversely verb allows inserting Rd macros literally. Does that mean we shouldn't care which of verb and code are used, since they seem to be typeset the same way? Of relevance, non-parsable code is correctly formatted as [`does not parse`][foobar] generates \code{\link[=foobar]{does not parse}} So one solution is to just declare code vs verb as an internal detail that doesn't concern users and roxygen should be free to generate one or the other based on the context. |
Considering that in roxygen markdown you cannot put
Yeah, links are parsed specially, we need to do a lot of magic there, because Rd is quite peculiar with them.
I think that is the current state of affairs, until there will be some formatting differences, e.g. we link symbols in |
@lionel- there are other some subtle differences — e.g. IIRC strings need to be closed and braces need to be matching in |
Should the tidy eval operators also be formatted as code? |
If you can provide me a compelling reason that it makes a difference I can look into it 😄 |
So that both inline snippets are formatted as code in this example:
#> `data` can be any vector with `names()` and `[[` implementations.
Do we need a more general way to be explicit that a backticked expression should be formatted as code?
The text was updated successfully, but these errors were encountered: