tewtal / SMZ3Randomizer

Super Metroid & A Link to the Past Crossover Item Randomizer V11
https://samus.link/
MIT License
73 stars 32 forks source link

Sanitize spoiler log search text for use as a regular expression #118

Closed RebelusQuo closed 3 years ago

RebelusQuo commented 3 years ago

We failed at escaping special regular expression characters when constructing a regex instance. With escapeRegExp from lodash we save the day. Also, in Javascript, an empty string is already a falsy value so if statements can be simplified.