Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve RegEx parser, reduce possibilities as the key for arbitrary p…
…roperties (#12121) * optimize handling of RegEx parser results Previous: - Copy `results`, for every subsequent result of other `patterns` - Loop over results to filter out `undefined` values - Loop over results to map to `clipAtBalancedParens` Current: - For each candidate, push the `clipAtBalancedParens(candidate)` into the `results` This way we are not copying existing results, and we are also avoiding additional loops over the entire array to filter out `undefined` values and map to `clipAtBalancedParens`. * do not allow `]` in the first part of arbitrary properties ``` [foo:bar] ─┬─ └── This part cannot contain `]` ``` This is also a very targeted fix for when the arbitrary properties seem to match a large piece of text, but shouldn't * add real world tests for parsing candidate strings * sync package-lock.json * update changelog
- Loading branch information