fix herf match func
This commit is contained in:
@@ -91,7 +91,14 @@ export const isMatch = (s, p) => {
|
||||
return true;
|
||||
}
|
||||
|
||||
return p.slice(pIndex).replaceAll("*", "") === "";
|
||||
while (pIndex < p.length) {
|
||||
if (p[pIndex] !== "*") {
|
||||
return false;
|
||||
}
|
||||
pIndex++;
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user