Open hadley opened 1 year ago
Looks like this is caused by the #' @examples
block above. A smaller reprex:
#' @examples
#' print(1 + 1)
NULL
#' Uh oh
Note that the text within the Roxygen documentation is being highlighted as though it were R code still.
Here's the offending code:
We need to improve how the "end" of an roxygen example code chunk ends.
Another instance of wrong highlighting in comments, not in roxygen comments but for comments followed by 4+ dashes:
That was intentional; the goal there is to help comment-style section titles stand out. Do you prefer the "plain" comment styling?
@kevinushey Having them stand out could be nice, but the color matching the default/code color doesn't make them stand out to me. I'd prefer either plain comment styling or using a different color (like a lighter green or something here) to have them stand out. Turning that text to black seems like it's not being interpreted as a comment.
Just hit this again for the docs of between()
in dplyr
https://github.com/user-attachments/assets/70fd5721-44c0-4922-971f-0d6394d7d6db
Positron Version:
Steps to reproduce the issue:
cf https://github.com/r-lib/devtools/blob/main/R/package.R#L88
What did you expect to happen?
Looks like something further up the page leaves the parser in the wrong state.
Were there any error messages in the output or Developer Tools console?