trond-eirik
August 2nd, 2000, 03:28 AM
Hello
Does anyone know about a good algorithm to compare to versions of a text document?
I want a in-view present, where deleted text are for example gray, and new text are for example blue.
If you copy the lines of code below into a html page, it should give a visible view of what I'm looking for.
Almost the same as the "Track Changes" function in word, except that I want to compare to existing files.
<p>
<b>Old text:</b> This is the old text. As you see it is not a long text.
</p>
<p>
<b>New text:</b> This is the new text. As you see it is not a long text. But it have things added and removed.
</p>
<p>
<b>Diff view:</b> This is the <font color='gray'>old</font><font color='blue'>new</font> text. As you see it is not a long text. <font color='blue'>But it have things added and removed.</font>
Does anyone know about a good algorithm to compare to versions of a text document?
I want a in-view present, where deleted text are for example gray, and new text are for example blue.
If you copy the lines of code below into a html page, it should give a visible view of what I'm looking for.
Almost the same as the "Track Changes" function in word, except that I want to compare to existing files.
<p>
<b>Old text:</b> This is the old text. As you see it is not a long text.
</p>
<p>
<b>New text:</b> This is the new text. As you see it is not a long text. But it have things added and removed.
</p>
<p>
<b>Diff view:</b> This is the <font color='gray'>old</font><font color='blue'>new</font> text. As you see it is not a long text. <font color='blue'>But it have things added and removed.</font>