mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 20:47:45 +00:00
LibRegex: Treat brace quantifiers with invalid contents as literals
Fixes #6208.
This commit is contained in:
parent
25d336bc27
commit
1b071455b1
2 changed files with 32 additions and 8 deletions
|
@ -127,3 +127,12 @@ test("non-greedy brace quantifier", () => {
|
|||
expect(res.length).toBe(1);
|
||||
expect(res[0]).toBe("abc");
|
||||
});
|
||||
|
||||
// #6208
|
||||
test("brace quantifier with invalid contents", () => {
|
||||
let re = /{{lit-746579221856449}}|<!--{{lit-746579221856449}}-->/;
|
||||
let res = re.exec("{{lit-746579221856449}}");
|
||||
|
||||
expect(res.length).toBe(1);
|
||||
expect(res[0]).toBe("{{lit-746579221856449}}");
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue