Is there a way to diff files sentence-by-sentence instead of line-by-line?

前端 未结 2 1177
梦如初夏
梦如初夏 2021-02-20 12:54

Just trying to get diff to work better for certain kinds of documents. With LaTeX, for example, I might have a long paragraph that is strictly just one line, but I don\'t want t

相关标签:
2条回答
  • 2021-02-20 13:22

    wdiff will give you a word-by-word diff instead of line-by-line. I'm not aware of any sentence-by-sentence diff programs.

    0 讨论(0)
  • 2021-02-20 13:35

    Preprocess the files before diffing them. Write a script to write one sentence per line and any line by line diff program will work.

    I have done this on a C token level for diffing C code in order to make absolutely sure my CVS merge was correct.

    0 讨论(0)
提交回复
热议问题