Automatically link inline code

autolink(text)

autolink_url(text)

Arguments

text

String of code to highlight and link.

Value

If text is linkable, an HTML link for autolink(), and or just the URL for autolink_url(). Both return NA if the text is not linkable.

Examples

autolink,Automatically link inline code,Automatically link inline code — autolink,Source: R/link.R,autolink.Rd,character(0),c("autolink", "autolink_url"),character(0),list(title = "Description", contents = "

Automatically link inline code

"),list(description = "Automatically link inline code"),autolink(text) autolink_url(text),list(list(name = "text", description = "

String of code to highlight and link.

")),TRUE,
autolink("stats::median()")
#> [1] "<a href='https://rdrr.io/r/stats/median.html'>stats::median()</a>"
autolink("vignette('grid', package = 'grid')")
#> [1] "<a href='https://cran.rstudio.com/web/packages/grid/vignettes/grid.pdf'>vignette('grid', package = 'grid')</a>"
autolink_url("stats::median()")
#> [1] "https://rdrr.io/r/stats/median.html"
,list(list(title = "Value", contents = "

If text is linkable, an HTML link for autolink(), and or just\nthe URL for autolink_url(). Both return NA if the text is not\nlinkable.

", slug = "value")),2021,list(name = "downlit", version = "0.2.1.9000", authors = "Hadley Wickham"),list(destination = "dev", mode = "release", version_label = "default", version_tooltip = "Released version", in_dev = FALSE),list(root = "../", title = "downlit"),list(),list(type = "default", left = "
  • \n Reference\n
  • \n
  • \n Changelog\n
  • ", right = "
  • \n \n \n \n \n
  • "),list(.present = TRUE),list(version = "1.6.1.9000"),FALSE,list(left = "

    Developed by Hadley Wickham.

    ", right = "

    Site built with pkgdown 1.6.1.9000.

    "),TRUE