Duplicated AllPageItems collection when nesting Table inside another Table
1 create new blank document, 1 page, no primary textframe
2 creatte empty TextFrame,
3 insert Table [2x2],
4 insert another Table [2x2] to the 1st table - into 1st cell,
5 insert another Table [2x2] to the 2nd table - into 1st cell,
6 now insert image into 3rd table - from step 5 - as InLine object after a space - so the cell is not converted into Graphics cell,
7 run script:
var items = app.activeDocument.allPageItems;
for (var i = 0; i < items.length; i++)
$.writeln(items[i].toSpecifier());
Expected result:
/document[@id=1]//text-frame[@id=246]
/document[@id=1]//rectangle[@id=286]
/document[@id=1]//image[@id=282]
Actual result:
/document[@id=1]//text-frame[@id=246]
/document[@id=1]//rectangle[@id=286]
/document[@id=1]//image[@id=282]
/document[@id=1]//rectangle[@id=286]
/document[@id=1]//image[@id=282]
/document[@id=1]//rectangle[@id=286]
/document[@id=1]//image[@id=282]
/document[@id=1]//rectangle[@id=286]
/document[@id=1]//image[@id=282]
Result: undefined
Each nesting doubles the number of Images.