We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 35a6bb9 commit 9068176Copy full SHA for 9068176
src/parse_assertions.rs
@@ -75,15 +75,12 @@ pub fn parse_position_comments(
75
}
76
has_left_caret = c == '<';
77
78
- static REGEX: Lazy<Regex> = Lazy::new(|| Regex::new("[!\\w_\\-.]+").unwrap());
+ static REGEX: Lazy<Regex> =
79
+ Lazy::new(|| Regex::new("[!\\w_\\-.]+").unwrap());
80
81
// If the comment node contains an arrow and a highlight name, record the
82
// highlight name and the position.
- if let (true, Some(mat)) = (
83
- has_arrow,
84
- REGEX
85
- .find(&text[arrow_end..]),
86
- ) {
+ if let (true, Some(mat)) = (has_arrow, REGEX.find(&text[arrow_end..])) {
87
assertion_ranges.push((node.start_position(), node.end_position()));
88
let tree_sitter::Point { row, column } = position;
89
result.push(Assertion {
0 commit comments