-
Notifications
You must be signed in to change notification settings - Fork 235
Struggling with {{
links
#1259
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
Comments
IDK if there is a way to write it with markdown, but this seems to work:
|
You can define a function for it as well: braces <- function() "\\code{\\link[=foo]{\\{\\{}}"
#' Foo
#' @md
#' @name foo
#' @description
#' This is a link `r braces()`. |
Thanks, it seems the Rd works properly with the dev version but not the CRAN one. |
IDK, but there seems to be no difference between CRAN and dev roxygen2 at this point, and the one with the |
Both the Rd and the md reprexes are fixed with the dev version actually. But not with CRAN roxygen. Very weird. |
Sorry that's my bad, I forgot to reset this changelist: modified R/markdown.R
@@ -193,7 +193,7 @@ mdxml_node_to_rd <- function(xml, state) {
unknown = mdxml_children_to_rd(xml, state),
paragraph = paste0("\n\n", mdxml_children_to_rd(xml, state)),
- text = escape_comment(xml_text(xml)),
+ text = escape_verb(xml_text(xml)),
emph = paste0("\\emph{", mdxml_children_to_rd(xml, state), "}"),
strong = paste0("\\strong{", mdxml_children_to_rd(xml, state), "}"),
softbreak = mdxml_break(state), This explains the differences I was observing. |
I'd like to hyperlink mentions of the
{{
operator in the rlang doc because it is not easily searchable.Here is a counter example with
!!
that works well:I would like to generate a similar link for
{{
, properly escaped:#> \code{\link[=op-inject]{\{\{}}
Ideally
[`{{`][foo]
would work but here is what we get:Escaping
{
does not work (same result with\\\\{\\\\}
):And unfortunately, trying to insert Rd manually does not work either
Fixing
[`{{`][foo]
so that it works as expected would be great. But I'd appreciate pointers to a workaround as well.The text was updated successfully, but these errors were encountered: