autolink {downlit}R Documentation

Automatically link inline code

Description

Automatically link inline code

Usage

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.

Options

downlit provides a number of options to control the details of the linking. They are particularly important if you want to generate "local" links.

Examples

autolink("stats::median()")
autolink("vignette('grid', package = 'grid')")

autolink_url("stats::median()")

[Package downlit version 0.4.3 Index]