View Parser - Fix ParsePair() with filter #2499
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes using filters on properties in arrays
Problem is related to the use of | character in filters as | character is handled as OR in regex. This makes replace singe get multiple matches which in the end leads to multiplied data by number of | characters.
Additionally I have added test case testParsePairWithAbs in ParserFilterTest. Initially I was thinking to modify the existing tests to check for nested array elements as well. But this will require changing almost all the test methods. So I've added the new test method based on testAbs() which checks that abs filter works in various nested array properties
I've noticed some style issue. CodeSniffer replaced
to
So I also included this change in the commit
This PR Fixes #2360
Checklist: