Skip to content

Commit 3b651aa

Browse files
committed
fix(parsing): apply PATTERN_MATCHES_EVERYTHING to regexful syntaxes by default
1 parent 6ad6073 commit 3b651aa

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main/java/org/skriptlang/skript/registration/SyntaxInfoImpl.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ private static Priority estimatePriority(Collection<String> patterns) {
3434
return SyntaxInfo.PATTERN_MATCHES_EVERYTHING;
3535
}
3636
priority = SyntaxInfo.COMBINED;
37+
} else if (chars[i] == '<') {
38+
if (i > 0 && chars[i - 1] == '\\') { // skip escaped angle brackets
39+
continue;
40+
}
41+
// regular expression string
42+
return SyntaxInfo.PATTERN_MATCHES_EVERYTHING;
3743
}
3844
}
3945
}

0 commit comments

Comments
 (0)