kpdecker / jsdiff

A javascript text differencing implementation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

At the end of the compared text, when there is a punctuation mark, something goes wrong

anniek-bisschop opened this issue · comments

You can also see this happening in the demo tool. When you hit the spacebar after the punctuation mark, it will be corrected.

test

After adding space:
After space

I can't repro this. If I paste This is a test and This is a test? into the text areas, with no trailing space, then I get exactly the correct result:

image

To confirm - you're trying this at http://incaseofstairs.com/jsdiff/? Any chance you're using an old version that's in your browser cache, or that a plugin is interfering somehow? Would be interested to hear if using a different browser magically fixes it. (I don't have anything like a complete theory of how exactly either issue would cause this outcome, though.)

I'm gonna close this as no-repro for now but will reopen and take another look if I get more info.