Problem
The following code
# styler: off
skip_if_not_installed("tibble")
local({
x <- 1
})
# styler: on
is styled to-
# styler: off
local({
x <- 1
})
skip_if_not_installed("tibble")
local
# styler: on
Note how skip() and local change their positions.
How to reproduce
Run the example code in interactive mode.
If you are looking for a more realistic example, run styler:::style_active_file() on this file.
Note
It's interesting that I can reproduce the issue in the minimal example posted above in the interactive mode, but not in a reprex.
