Rohland / htmldiff.net

Html Diff algorithm for .NET
MIT License
288 stars 83 forks source link

Issue with HTML Diff Visualization (em and strong tags) #35

Open moe-khan123 opened 5 years ago

moe-khan123 commented 5 years ago

Hi, great library and it works well in most text scenarios. I have found a scenario where it broke.

Old Text: Canadian artists and artistic groups by encouraging New Text: <em>Canadian </em><strong>artists and artistic groups by encouraging Result: <em><ins class='mod'>Canadian </em><strong>artists and artistic groups by encouraging

Expected Result: <em><ins class='mod'>Canadian </em><strong>artists and artistic groups by encouraging </ins>

Currently, the browser automatically closes the ins tag after the word "Canadian". There is no closing ins tag. the whole sentence should be highlighted in a light brown colour because the new text has bolds and italics in there.

image