Hi,
We have regressions in our Java software after updating Aspose a while back. We are currently using the latest Aspose version 20.8. The regression was caused due to comment range nodes being allowed in block-level nodes.
Question 1: In which release was this behavior introduced? It looks very similar to this: https://blog.aspose.com/2018/09/15/insert-bookmarks-at-block-cell-or-row-levels-in-word-documents-in-java/ so I thought maybe it would be 18.9. I’m not certain of that yet.
Question 2: Does anyone know if there is a simple way to prevent this behavior? I recall seeing an API in the past that might disable this new behavior, but I’m not sure if it works anymore or is available any longer. I will look into that some more shortly.
Thanks for any tips or suggestions on this one! I would prefer to simply switch off this behavior if possible or if there is a small programmatic solution, that would be helpful as well. I’m going to be looking into both options.
Note: The code is extending the DocumentVisitor and in visitBodyStart(), it iterates over the child nodes and now encounters an unexpected comment range start. I suppose I could simply force this node into the next adjacement paragraph node (but I don’t know it will be a paragraph node. It might be a table node that is next. What is the most general and straightforward way to revert the behavior to how it used to be?
I would be interested in ensuring none of the elements like bookmarks or comment ranges are allowed in block-level nodes ( on Block, Cell, Row Levels), so if the solution can handle all scenarios, that would be ideal.