diffplex icon indicating copy to clipboard operation
diffplex copied to clipboard

InlineDiffBuilder word diff in lines

Open MistyKuu opened this issue 8 years ago • 6 comments

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.

MistyKuu avatar Jun 11 '17 15:06 MistyKuu

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

mmanela avatar Jun 25 '17 00:06 mmanela

@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)

gandhis1 avatar Mar 25 '21 15:03 gandhis1

@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?

driekus77 avatar Jun 06 '21 10:06 driekus77

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

mmanela avatar Jun 06 '21 18:06 mmanela

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.

driekus77 avatar Jun 06 '21 18:06 driekus77

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.

mmanela avatar Jun 06 '21 20:06 mmanela