Closed N0M3AD closed 3 days ago
I have noticed similar behavior. I don't know if it is related to this (wrong) regexp in Uitls.cs:
private static Regex openingTagRegex = new Regex("^\\s*<[^>]+>\\s*$", RegexOptions.Compiled);
that match both opening and closing tag or to the problems of stack...
I believe I have encountered a similar problem when inserting an additional word at the end of a newly formatted text. I have developed a possible solution, set a PR (https://github.com/Rohland/htmldiff.net/pull/61) and in additional tests tried to check as many edge cases as possible that I could think of with this problem. I have also added your problem described above as a test case, although I believe that an opening <ins class=‘mod’>
was missing from your expected result.
Thanks - this is closed by #62 - version 1.5.0 should be available on nuget (if not, shortly after indexing).
If i compare texts with special tags like "sup" which was added (or deleted), the differ adds an ins-tag without closig it.
Here is a simple UT, that shows this behavior