File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -431,14 +431,14 @@ pub fn check(path: &Path, bad: &mut bool) {
431
431
}
432
432
433
433
if filename. ends_with ( ".ftl" ) {
434
- let line_backticks = line . chars ( ) . filter ( |ch| * ch == '`' ) . count ( ) ;
434
+ let line_backticks = trimmed . chars ( ) . filter ( |ch| * ch == '`' ) . count ( ) ;
435
435
if line_backticks % 2 == 1 {
436
436
suppressible_tidy_err ! ( err, skip_odd_backticks, "odd number of backticks" ) ;
437
437
}
438
- } else if line . contains ( "//" ) {
438
+ } else if trimmed . contains ( "//" ) {
439
439
let ( start_line, mut backtick_count) = comment_block. unwrap_or ( ( i + 1 , 0 ) ) ;
440
- let line_backticks = line . chars ( ) . filter ( |ch| * ch == '`' ) . count ( ) ;
441
- let comment_text = line . split ( "//" ) . nth ( 1 ) . unwrap ( ) ;
440
+ let line_backticks = trimmed . chars ( ) . filter ( |ch| * ch == '`' ) . count ( ) ;
441
+ let comment_text = trimmed . split ( "//" ) . nth ( 1 ) . unwrap ( ) ;
442
442
// This check ensures that we don't lint for code that has `//` in a string literal
443
443
if line_backticks % 2 == 1 {
444
444
backtick_count += comment_text. chars ( ) . filter ( |ch| * ch == '`' ) . count ( ) ;
You can’t perform that action at this time.
0 commit comments