1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 08:15:07 +00:00
serenity/Tests/LibRegex
Timothy Flynn 48cb15283a LibRegex: Explicitly check if a character falls into a table-based range
Previously, for a regex such as /[a-sy-z]/i, we would incorrectly think
the character "u" fell into the range "a-s" because neither of the
conditions "u > s && U > s" or "u < a && U < a" would be true, resulting
in the lookup falling back to assuming the character is in the range.

Instead, first explicitly check if the character falls into the range,
rather than checking if it falls outside the range. If the explicit
checks fail, then we know the character is outside the range.
2022-08-29 16:34:47 -04:00
..
Benchmark.cpp Tests: Move LibRegex tests to Tests/LibRegex 2021-05-06 17:54:28 +02:00
CMakeLists.txt Tests: Link some tests directly against LibUnicodeData 2022-01-04 22:49:43 +00:00
Regex.cpp LibRegex: Explicitly check if a character falls into a table-based range 2022-08-29 16:34:47 -04:00
RegexLibC.cpp Everywhere: Replace single-char StringView op. arguments with chars 2022-07-12 23:11:35 +02:00