Skip to content

Escaping string characters in roxygen @examples #505

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

Closed
rorynolan opened this issue May 3, 2019 · 2 comments · Fixed by #512
Closed

Escaping string characters in roxygen @examples #505

rorynolan opened this issue May 3, 2019 · 2 comments · Fixed by #512

Comments

@rorynolan
Copy link

Hi there,
The following file doesn't make it through styler. It throws a warning message:
When processing r.R: '\.' is an unrecognized escape in character string starting ""\."

#' Function.
#'
#' Details.
#'
#' @param x Only argument.
#'
#' @examples
#' \dontrun{
#' funfunfun("\\.txt$")
#' }
#' @export
funfunfun <- function(x) {
  invisible(x)
}

Is this a bug, or am I missing something?

Thanks, love styler,
Rory

@lorenzwalthert
Copy link
Collaborator

lorenzwalthert commented May 9, 2019

Sorry for the late reply. I looked into it for some time but the fix turned out to be easy. See #512.

@rorynolan
Copy link
Author

Thank you! Pretty quick response in my experience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants