mmanela / diffplex

DiffPlex is Netstandard 1.0+ C# library to generate textual diffs.
Apache License 2.0
995 stars 183 forks source link

InlineDiffBuilder word diff in lines #29

Open MistyKuu opened 7 years ago

MistyKuu commented 7 years ago

Is there a way to include Subpieces in InlineDiffBuilder? I'm trying to create inline diff view but I want to higlight the changes on word level instead of line level. With SideBySideBuilder it's possible but Inline doesn't generate it.

mmanela commented 7 years ago

It is possible just I never added it for that . If you go ahead I would gladly accept a PR.

gandhis1 commented 3 years ago

@mmanela Has anything changed with regards to this since this was posted 3 years ago? I too am looking to use InlineDiffBuilder for word-level chunking (or anything more granular than line level)

driekus77 commented 3 years ago

@mmanela I also would appreciate more detailed diff results for InlineDiffBuilder.

If I have some time I try to create a PR for this. Can you give some starting tips?

mmanela commented 3 years ago

I was thinking about this, it might (havent looked too deeply) be simplest to generalize the SideBySideDiffbuilder's logic and have InlineDiffBuilder just consume the results of SideBySide and then flatten it.

driekus77 commented 3 years ago

I'm already busy with some code. Adding a HierarchialDiff as extra methods on both SideBySideDiffBuilder and InlineDiffBuilder. These methods use by default all 3 chunkers: Lines --> Words --> Chars.

mmanela commented 3 years ago

I am looking forward to seeing what you end up with. Ideally, we can share most of the logic between the two diff builders. That would make it more maintainable.