File tree Expand file tree Collapse file tree 4 files changed +7
-2
lines changed Expand file tree Collapse file tree 4 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -1166,6 +1166,7 @@ fn parse_directive(text: &str) -> Option<Directive> {
11661166 . and_then ( |rhs| match rhs. trim ( ) {
11671167 "skip" => Some ( Directive :: Skip ) ,
11681168 "skip-file" => Some ( Directive :: SkipFile ) ,
1169+ "skip file" => Some ( Directive :: SkipFile ) ,
11691170 "on" => Some ( Directive :: On ) ,
11701171 "off" => Some ( Directive :: Off ) ,
11711172 _ => None ,
Original file line number Diff line number Diff line change @@ -95,6 +95,7 @@ Comments are reformatted to ensure consistent spacing while preserving their con
9595
9696``` r
9797# comments : compare
98+ # !/usr/bin/env Rscript
9899# This is a comment
99100# 'This is roxygen
100101# #This is a header
@@ -104,7 +105,7 @@ Comments are reformatted to ensure consistent spacing while preserving their con
104105
105106- Roxygen comments (` #' ` ) maintain their structure
106107- Header comments (` ## ` , ` ### ` ) keep their formatting
107- - Shebangs (` #!/usr/bin/env Rscript ` ) remain unchanged
108+ - Shebangs (` [ #!/usr/bin/env Rscript](http://roughly.dev/) ` ) remain unchanged
108109- Comments with quotes (` #'quoted' ` ) are left as-is to avoid conflicts
109110
110111### Line Spacing
Original file line number Diff line number Diff line change 22source : crates / roughly / tests / test_format .rs
33expression : code
44-- -
5+ #! / usr / bin / env Rscript
56# This is a comment
67#' This is roxygen
78##This is a header
Original file line number Diff line number Diff line change @@ -119,11 +119,13 @@ Comments are reformatted to ensure consistent spacing while preserving their con
119119
120120``` r
121121# Before formatting
122+ # !/usr/bin/env Rscript
122123# This is a comment
123124# 'This is roxygen
124125# #This is a header
125126
126127# After formatting
128+ # !/usr/bin/env Rscript
127129# This is a comment
128130# ' This is roxygen
129131# #This is a header
@@ -133,7 +135,7 @@ Comments are reformatted to ensure consistent spacing while preserving their con
133135
134136- Roxygen comments (` #' ` ) maintain their structure
135137- Header comments (` ## ` , ` ### ` ) keep their formatting
136- - Shebangs (` #!/usr/bin/env Rscript ` ) remain unchanged
138+ - Shebangs (` [ #!/usr/bin/env Rscript](http://roughly.dev/) ` ) remain unchanged
137139- Comments with quotes (` #'quoted' ` ) are left as-is to avoid conflicts
138140
139141### Line Spacing
You can’t perform that action at this time.
0 commit comments