This is Proof Of Concept -patch for post compare
line-filtering using regular expressions. After this
patch nobody should claim it can't be done, or that it
is difficult etc.
It was pretty easy.
This patch adds simple container class FilterList which
holds compiled regular expressions for matching. And
implements simple Match() function to match string
against that list of regular expressions.
I used David's line filtering code as example for
actual post filtering. I match every line in difference
against list of regular expressions (in FilterList). If
any line matches, difference is marked as trivial.
That is it.
As this is proof of concept -patch is it not in any way
finished, just make it to work to show how the thing
can be done.
How to use:
- enable line filtering in filters-dialog
- give *one* regular expression to first line (as this
patch does not parse multiple lines)
When files are compared, if the expression matches any
of the lines in the difference, the difference is
marked as trivial. This made it easier to see the
effect as I didn't need to make every line to match first.
Log in to post a comment.