You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
highlighter: Fix condition checking for overlapping injection ranges
This fixes a case which could cause injections to become out of order.
The test case has two patterns that emit overlapping captures for an
injection, one at bytes 11..52 and another at 20..51. If the pattern
shown in the test case comes later in the file than the pattern in Rust
injections that highlights macro invocation token tree nodes, then the
larger capture (11..52) comes after the smaller one (20..51). The
part of the injections that decides precedence didn't handle this case
as the larger range ends after the smaller range. We change this
condition to do a generic intersection/overlap check.
0 commit comments