Closed andreacampi closed 11 years ago
BTW, I don't understand the call to figureUsed
at breakrecord.js:142. Passing the index of the block doesn't seem correct, it's supposed to be a figureIndex.
I pushed to my repo what I think is needed to fix this issue. @bramstein can you take a look?
I also tried to updated the unit test, but that's quite tricky without setting up a whole document.
Fix merged, all tests are passing.
I've seen this bug triggered by used figures; in my case, it manifested itself with an unnecessary empty page. But I suspect the bug may be worse that that.
The code naively loops over content blocks, without taking into consideration children of that block. It looks to me like it should instead use the same logic as
Page.fillColumn
, usingblock.getNextNonChildBlock
.