JavaScript based diff utility

Posted by poke on Stack Overflow See other posts from Stack Overflow or by poke
Published on 2010-06-16T13:22:40Z Indexed on 2010/06/16 13:32 UTC
Read the original article Hit count: 238

Filed under:
|

I'm looking for a diff equivalent written in JavaScript that only returns/prints relevant lines. I don't want both full text displayed next to each other with the differences highlighted, but just want the actual differences (plus some buffer lines to know where the difference is), similar to the output from the linux diff utility.

Does anybody know a javascript function that does this? All differences should be recognized (even changed whitespace). Thanks.

edit

I have seen jsdifflib but in the example it always shows the full source, so unless there is a way to change the output somehow, it doesn't fully meet my requirements.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about diff