matchit
matchit copied to clipboard
Another insertion issue caused by the absence of a leading slash
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.