-
Notifications
You must be signed in to change notification settings - Fork 755
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Poor compare experience with Substitution Filters #2221
Comments
Unfortunately, the current Substitutions filter replaces each Diff block after comparison and re-compares each Diff block, so it often does not yield the expected results. A similar function, PrediffLineFilter plugin, performs replacement before comparison, so it seems to give better results. If you configure as below and apply this plugin, you will get better results than the Substitutions filter. (Note: Regular expressions and replacement strings have been changed for this plugin. |
Why not add the option when to filter: |
I know the Substitution Filters had issues some time ago: https://github.com/WinMerge/winmerge/issues?q=is%3Aissue+is%3Aopen+substitution+filters
But mine filters is not much complicated and I know it has been working some time ago. But Winmerge keep has having a poor result on comparing files with lines has differenced only in prefix characters even if they are removed by the substitution filters.
Here is the example for reproduction.
Left tab file: https://github.com/andry81/tacklebar/blob/1f90345e8ae66ccc5d2bc25e0a99e8b3bed3f1ce/changelog.txt
Right tab file: https://github.com/andry81/tacklebar/blob/1f90345e8ae66ccc5d2bc25e0a99e8b3bed3f1ce/userlog.md
Substitution Filters:
If try to compare with the substitution filters enabled, then there would be a comparison mess and Winmerge will treat 2 text files as completely different when it is not.
The
userlog.md
actually just a filtered, decorated and user friendly variant of thechangelog.txt
file (if you interested why these files exists: https://gist.github.com/andry81/d278e6d129ca1af326eafb67470a2ae3).To force Winmerge to compare them correctly I have to use Notepad++ MultiReplace plugin with these lists:
https://github.com/andry81/tacklebar/tree/HEAD/deploy/notepad%2B%2B/plugins/MultiReplace/Lists/winmerge
With the plugin I can strip (undecorate) the
userlog.md
, merge it from thechangelog.txt
and then, redecorate it back. But all of these is a workaround to the not working Substitution Filters.Is there a chance to fix Substitution Filters?
The text was updated successfully, but these errors were encountered: