Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Links with URL encoded spaces #1209

Closed
mikkmart opened this issue Mar 2, 2021 · 2 comments · Fixed by #1210
Closed

Links with URL encoded spaces #1209

mikkmart opened this issue Mar 2, 2021 · 2 comments · Fixed by #1210
Labels
bug an unexpected problem or unintended behavior

Comments

@mikkmart
Copy link

mikkmart commented Mar 2, 2021

I'm not sure how to make a reprex for roxygen2, but here's an example file to reproduce the problem:

#' Test docs
#'
#' [link text](https://foo.bar/link%20target)
#'
#' @name test
NULL

When rozygenize()ing this file, I get a warning citing @description mismatched braces or quotes and the description block is not rendered. Replacing the URL encoded space (%20) in the link with a real space fixes the rendering but breaks the markdown so that it's no longer recognized as a link.

@mikkmart
Copy link
Author

mikkmart commented Mar 2, 2021

Actually, \href{https://foo.bar/link%20target}{link text} works so I guess it's something to do with the markdown?

@gaborcsardi
Copy link
Member

Yeah, it seems that you need to escape % in link targets currently:

#' [link text](https://foo.bar/link\%20target)

I would consider this a bug.

@gaborcsardi gaborcsardi added the bug an unexpected problem or unintended behavior label Mar 2, 2021
gaborcsardi added a commit that referenced this issue Mar 2, 2021
gaborcsardi added a commit that referenced this issue Mar 2, 2021
hadley pushed a commit that referenced this issue Mar 2, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants