Skip to content

Commit a1527be

Browse files
more generic function name for space styling function
1 parent 50453cb commit a1527be

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

R/rules-spacing.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@ set_space_around_op <- function(pd_flat) {
2020
}
2121

2222
#' Style spacing around math tokens
23-
#' @inheritParams style_space_around_math_token_one
23+
#' @inheritParams style_space_around_token
2424
#' @param one Character vector with tokens that should be surrounded by at
2525
#' least one space (depending on `strict = TRUE` in the styling functions
2626
#' [style_text()] and friends). See 'Examples'.
2727
#' @param zero Character vector of tokens that should be surrounded with zero
2828
#' spaces.
2929
style_space_around_math_token <- function(strict, zero, one, pd_flat) {
3030
pd_flat %>%
31-
style_space_around_math_token_one(strict, zero, 0L) %>%
32-
style_space_around_math_token_one(strict, one, 1L)
31+
style_space_around_token(strict, zero, 0L) %>%
32+
style_space_around_token(strict, one, 1L)
3333
}
3434

3535
#' Set spacing of token to a certain level
@@ -41,7 +41,7 @@ style_space_around_math_token <- function(strict, zero, one, pd_flat) {
4141
#' @param tokens Character vector with tokens that should be styled.
4242
#' @param level Scalar indicating the amount of spaces that should be inserted
4343
#' around the `tokens`.
44-
style_space_around_math_token_one <- function(pd_flat, strict, tokens, level) {
44+
style_space_around_token <- function(pd_flat, strict, tokens, level) {
4545
op_after <- pd_flat$token %in% tokens
4646
op_before <- lead(op_after, default = FALSE)
4747
idx_before <- op_before & (pd_flat$newlines == 0L)

man/style_space_around_math_token_one.Rd renamed to man/style_space_around_token.Rd

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)