File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ wrap_subexpr_in_curly <- function(pd,
84
84
ind_to_be_wrapped ,
85
85
indent_by ) {
86
86
to_be_wrapped_starts_with_comment <-
87
- pd [ind_to_be_wrapped [1 ], ] $ token == " COMMENT"
87
+ pd $ token [ind_to_be_wrapped [1 ]] == " COMMENT"
88
88
new_expr <- wrap_expr_in_curly(
89
89
pd [ind_to_be_wrapped , ],
90
90
stretch_out = c(! to_be_wrapped_starts_with_comment , TRUE )
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ next_non_comment <- function(pd, pos) {
67
67
# ' @param pos The position of the token to start the search from.
68
68
extend_if_comment <- function (pd , pos ) {
69
69
if (pos == nrow(pd )) return (pos )
70
- if (pd [pos + 1 ,] $ token == " COMMENT" ) {
70
+ if (pd $ token [pos + 1 ] == " COMMENT" ) {
71
71
extend_if_comment(pd , pos + 1L )
72
72
} else {
73
73
pos
You can’t perform that action at this time.
0 commit comments