scope_normalize: Convert the styling scope to its lower-level representation

View source: R/style-guides.R

scope_normalizeR Documentation

Convert the styling scope to its lower-level representation

Description

If scope is of class character and of length one, the value of the argument and all less-invasive levels are included too (e.g. styling tokens includes styling spaces). If scope is of class AsIs, every level to be included has to be declared individually. See compare tidyverse_style() for the possible levels and their order.

Usage

scope_normalize(scope, name = substitute(scope))

Arguments

scope

A character vector of length one or a vector of class AsIs.

name

The name of the character vector to be displayed if the construction of the factor fails.

See Also

Other third-party style guide helpers: next_non_comment(), pd_is

Examples

scope_normalize(I("tokens"))
scope_normalize(I(c("indention", "tokens")))

krlmlr/styler documentation built on April 8, 2024, 7:53 p.m.