Learn R Programming

gluedown (version 1.0.2)

md_autolink: Markdown autolink

Description

Take a character vector and wrap each element in < and > to return a glue vector of autolink text. This inline is rendered as the <href> HTML tag.

Usage

md_autolink(url)

Arguments

url

A character vector of absolute URLs.

Value

A glue vector of length equal to x.

Details

Autolinks are absolute URIs and email addresses inside < and >. They are parsed as links, with the URL or email address as the link label.

A URI autolink consists of <, followed by an absolute URI followed by >. It is parsed as a link to the URI, with the URI as the link<U+2019>s label.

An absolute URI, for these purposes, consists of a scheme followed by a colon (:) followed by zero or more characters other than ASCII whitespace and control characters, <, and >. If the URI includes these characters, they must be percent-encoded (e.g. %20 for a space).

For purposes of this spec, a scheme is any sequence of 2<U+2013>32 characters beginning with an ASCII letter and followed by any combination of ASCII letters, digits, or the symbols plus (<U+201D>+<U+201D>), period (<U+201D>.<U+201D>), or hyphen (<U+201D>-<U+201D>).

See Also

Other inline functions: md_bold(), md_code(), md_convert(), md_disallow(), md_escape(), md_hardline(), md_image(), md_issue(), md_italic(), md_link(), md_softline(), md_strike(), md_text()

Examples

Run this code
# NOT RUN {
md_autolink("http://foo.bar.baz")
# }

Run the code above in your browser using DataLab