matchit icon indicating copy to clipboard operation
matchit copied to clipboard

Another insertion issue caused by the absence of a leading slash

Open ck961018 opened this issue 1 month ago • 0 comments

Description

#[test]
fn local_test() {
    InsertTest(vec![("/{foo}", Ok(())), ("/{foo}suffix", Ok(()))]).run(); // success
    InsertTest(vec![("{foo}", Ok(())), ("{foo}suffix", Ok(()))]).run() // fail
}

Cause

The prefix_wild_child_in_segment function does not correctly handle the prefix of the root node without leading slash.

ck961018 avatar Dec 06 '25 06:12 ck961018