I need to replace the non breaking spaces in the entire document with normal space (" ") to do some operations and then replace those runs with non breaking spaces again.
To achieve this, I have used FindAndReplace Options and collected a list of runs of which non breaking space was replaced. And at the end, text of all the runs of that list is set to non breaking space again.
Also, an exception is set to be thrown if that list of runs contain text other than normal space (" ").
This is working fine with aspose.words library version 20.3. No exception is thrown with given input. However, it is not working with version 21.2. The list of runs contain text other than normal space after find and replace option. Please refer to screen shot.
Could you please look into the same.
Please note: It is not working from aspose library version 20.12.
The code, input file, expected result(from v20.3) and screenshot of error result (from v21.2) are attached.
StandAloneCode.zip (53.8 KB)