Skip to content

Commit 6d9e330

Browse files
recover other changes in vignette
1 parent 1541ef8 commit 6d9e330

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

vignettes/detect-alignment.Rmd

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,13 @@ call(
5959

6060
## Function calls
6161

62-
We generally distinguish the case of named and unnamed columns.
62+
### Non-technical definition
6363

64-
### Non-technical
64+
Below, we try to explain in an intuitive way how your code should look like to
65+
be recognized as aligned.
6566

6667
**If all arguments in the first column are named**: Make commas match position
67-
vertically and right align everything between commas
68+
vertically and right align everything between commas:
6869

6970
```{r}
7071
# all arguments of first column named -> must right align
@@ -88,7 +89,7 @@ fell(
8889
the first argument of the first column is named (`p = 2`), the second argument
8990
of the first column is not (`31`)] Make all but the first column's commas match
9091
position vertically and right align everything between the commas, except before
91-
the first comma on a line, give priority to correctly indent (i.e. left align).
92+
the first comma on a line, give priority to correctly indent (i.e. left align):
9293

9394
```{r}
9495
# not all arguments of first column named, hence, only
@@ -130,7 +131,10 @@ purrr::map(x, fun, # arguments on same line as opening brace are not considered
130131
)
131132
```
132133

133-
## technical
134+
## Technical definition
135+
136+
This section closely follows the implementation of the alignment detection and
137+
is mostly aimed at developers for understanding styler internals.
134138

135139
Function calls are aligned if **all** of the following conditions hold (for all
136140
but the very first line (i.e. `call(` below):

0 commit comments

Comments
 (0)