code_block: Render code i.e. package (or function) name

View source: R/fct_code.R

code_blockR Documentation

Render code i.e. package (or function) name

Description

Renders either a package name (as italics and formatted as code) or a function (formatted as code), optionally include a link

Usage

code_block(string, pkg = FALSE, href = NULL, noWS = NULL)

Arguments

pkg

logical, if TRUE the output text will be italicised (representing a package name). If FALSE it won't be italicised (representing a function name or arbitrary R code).

href

optional link to include

code

the text to be formatted

Value

a HTML string which can be inserted directly into the UI of the app, showing the code as formatted, (potentially) clickable text


chrisbrownlie/advancedShiny documentation built on Aug. 2, 2022, 3:29 a.m.