Better naming for this regex.
This commit is contained in:
parent
938eae8536
commit
0bd223f032
1 changed files with 2 additions and 2 deletions
|
|
@ -7,7 +7,7 @@ use std::fs;
|
|||
use tree_sitter::{Language, Parser, Point};
|
||||
|
||||
lazy_static! {
|
||||
static ref HIGHLIGHT_NAME_REGEX: Regex = Regex::new("[\\w_\\-.]+").unwrap();
|
||||
static ref PROPERTY_NAME_REGEX: Regex = Regex::new("[\\w_\\-.]+").unwrap();
|
||||
}
|
||||
|
||||
#[derive(Debug, Eq, PartialEq)]
|
||||
|
|
@ -76,7 +76,7 @@ pub fn parse_position_comments(
|
|||
// If the comment node contains an arrow and a highlight name, record the
|
||||
// highlight name and the position.
|
||||
if let (true, Some(mat)) =
|
||||
(has_arrow, HIGHLIGHT_NAME_REGEX.find(&text[arrow_end..]))
|
||||
(has_arrow, PROPERTY_NAME_REGEX.find(&text[arrow_end..]))
|
||||
{
|
||||
assertion_ranges.push((node.start_position(), node.end_position()));
|
||||
result.push(Assertion {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue