mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 13:19:05 +00:00
LibRegex: Take trailing inversion state into account in block comparison
Fixes #3421.
This commit is contained in:
parent
59ba2fb2ee
commit
08ebfaff17
Notes:
github-actions[bot]
2025-02-01 10:31:02 +00:00
Author: https://github.com/alimpfard
Commit: 08ebfaff17
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3424
Reviewed-by: https://github.com/gmta ✅
2 changed files with 3 additions and 1 deletions
|
@ -500,7 +500,8 @@ static bool has_overlap(Vector<CompareTypeAndValuePair> const& lhs, Vector<Compa
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
// We got to the end, just double-check that the inverse flag was not left on (which would match everything).
|
||||||
|
return current_lhs_inversion_state();
|
||||||
}
|
}
|
||||||
|
|
||||||
enum class AtomicRewritePreconditionResult {
|
enum class AtomicRewritePreconditionResult {
|
||||||
|
|
|
@ -715,6 +715,7 @@ TEST_CASE(ECMA262_match)
|
||||||
{ "^(\\d{4}|[+-]\\d{6})(?:-?(\\d{2})(?:-?(\\d{2}))?)?(?:[ T]?(\\d{2}):?(\\d{2})(?::?(\\d{2})(?:[,.](\\d{1,}))?)?(?:(Z)|([+-])(\\d{2})(?::?(\\d{2}))?)?)?$"sv,
|
{ "^(\\d{4}|[+-]\\d{6})(?:-?(\\d{2})(?:-?(\\d{2}))?)?(?:[ T]?(\\d{2}):?(\\d{2})(?::?(\\d{2})(?:[,.](\\d{1,}))?)?(?:(Z)|([+-])(\\d{2})(?::?(\\d{2}))?)?)?$"sv,
|
||||||
""sv,
|
""sv,
|
||||||
false, }, // See above, also ladybird#2931.
|
false, }, // See above, also ladybird#2931.
|
||||||
|
{ "[^]*[^]"sv, "i"sv, true }, // Optimizer bug, ignoring an enabled trailing 'invert' when comparing blocks, ladybird#3421.
|
||||||
};
|
};
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue