@@ -20,16 +20,16 @@ set_space_around_op <- function(pd_flat) {
20
20
}
21
21
22
22
# ' Style spacing around math tokens
23
- # ' @inheritParams style_space_around_math_token_one
23
+ # ' @inheritParams style_space_around_token
24
24
# ' @param one Character vector with tokens that should be surrounded by at
25
25
# ' least one space (depending on `strict = TRUE` in the styling functions
26
26
# ' [style_text()] and friends). See 'Examples'.
27
27
# ' @param zero Character vector of tokens that should be surrounded with zero
28
28
# ' spaces.
29
29
style_space_around_math_token <- function (strict , zero , one , pd_flat ) {
30
30
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 )
33
33
}
34
34
35
35
# ' Set spacing of token to a certain level
@@ -41,7 +41,7 @@ style_space_around_math_token <- function(strict, zero, one, pd_flat) {
41
41
# ' @param tokens Character vector with tokens that should be styled.
42
42
# ' @param level Scalar indicating the amount of spaces that should be inserted
43
43
# ' 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 ) {
45
45
op_after <- pd_flat $ token %in% tokens
46
46
op_before <- lead(op_after , default = FALSE )
47
47
idx_before <- op_before & (pd_flat $ newlines == 0L )
0 commit comments