Docx compare creates diff between enumeration and following text

We are using Aspose.Words for .NET. 22.6.0 to compare doc/docx files and to save the result as html.

We noticed a problem with the resulting diff around enumerations. See the screenshot below. In both cases there were 3 enumeration points that got deleted and new text inserted instead. In the first case the third enumeration and the new text are similar. In the second case they are not. This leads in the first case to a diff between the third enumeration and the new text, loosing the information that the deleted text was part of an enumeration. We would have expected the first case to look like the second case, i.e. no diff mixing the enumeration points and the new text. In any case the “3.” should not be missing from the diff.

2022-06-09 06_59_38-Window.png (11.2 KB)

Find attached a Visual Studio 2022 solution and test documents that shows this problem.
Steps to reproduce:

  • build attached solution
  • run the console program
  • take a look at the created Diff.html file

DeletedEnumerationDiffBug.zip (50.3 KB)

@IBP Thank you for reporting the problem to us. But, I am afraid, this is an expected behavior. If you compare your documents using MS Word and save the result as HTML you will see almost the same behavior with lists in the output: ms.zip (11.8 KB)
So I do not think we should change the current behavior of Aspose.Words in this case.