mirror of
https://github.com/XAMPPRocky/tokei
synced 2024-08-27 19:29:27 +00:00
* Fix backslash bug (#915) * fix * Update test Co-authored-by: scenq <me>
This commit is contained in:
parent
e1bde8ca0f
commit
3c486247fb
|
@ -570,6 +570,8 @@ impl SyntaxCounter {
|
|||
let quote = self.quote.take().unwrap();
|
||||
trace!("End {:?}", quote);
|
||||
Some(quote.len())
|
||||
} else if !self.quote_is_verbatim && window.starts_with(br"\\") {
|
||||
Some(2)
|
||||
} else if !self.quote_is_verbatim
|
||||
&& window.starts_with(br"\")
|
||||
&& self
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* 23 lines 16 code 4 comments 3 blanks */
|
||||
/* 37 lines 23 code 5 comments 9 blanks */
|
||||
|
||||
/*
|
||||
* Simple test class
|
||||
|
@ -21,3 +21,17 @@ class Foo
|
|||
System.out.println("FooBar"); //Not counted
|
||||
}
|
||||
}
|
||||
|
||||
// issues/915
|
||||
public class BackSlash {
|
||||
public void run()
|
||||
{
|
||||
"\\"; // 1 code + 2 blanks
|
||||
|
||||
|
||||
"\\"; // 1 code + 3 blanks
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue