davidar / pandiff

Prose diffs for any document format supported by Pandoc
MIT License
285 stars 24 forks source link

more coherent diffs #7

Open reagle opened 5 years ago

reagle commented 5 years ago

In the resulting output (screenshot of docx below) the diffs aren't friendly. Notice the sentence "Additionally, the lessons learned from that time are at risk of being forgotten" is fragmented, part of it is buried in deleted text and the rest follows all the deleted text. Is there a diff option that could improve on this?

Screen Shot 2019-10-02 at 4 41 09 PM
davidar commented 4 years ago

Good question. In this case it seems like it would be better to diff at the level of sentences or paragraphs rather than words. Would it help to have a global setting to change this, or would that be too coarse?

reagle commented 4 years ago

I'm happy to try either, I have no thoughts about the granularity of the setting presently.

BTW: The source files used above use semantic line breaks, which make normal diffs much nicer to view.

Screen Shot 2019-10-03 at 8 17 12 AM