kpdecker / jsdiff

A javascript text differencing implementation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HTML in text handling error?

designosis opened this issue · comments

In the demo, with the text <p>Guess what?</p> in the first field, and a space after the ? in the second ...

Screen Shot 2022-05-27 at 10 53 52 PM

It seems to think the </ has changed as well? Perhaps it groups all non-alphanumerics? I'd suggest adding a parameter that gives tags special treatment.

Edit: I guess this isn't designed to handle HTML tags at all :) Is there a way to render existing tags (such as <p></p> or <h1></h1>)?