flair_lines: Adds decorative formatting (flair) to parts of a string or...

Description Usage Arguments Value Examples

View source: R/flair_lines.R

Description

flair_lines returns a string with formatting wrappers(currently only html), or applies the formatting to the source elements of a with_flair object.

Usage

1
2
3
4
flair_lines(x, lines)

## Default S3 method:
flair_lines(x, lines)

Arguments

x

A string or with_flair object

lines

Integer vector indicating which lines to apply the flair styling to.

Value

A string with formatting wrappers.

Examples

1
2
code_string <- "x <- mean(1:10, na.rm = TRUE)
sqrt(x)" %>% flair_lines(2)

flair documentation built on April 24, 2020, 1:06 a.m.