sample html won't break correctly on the next page
Hi,
I am trying to render a hierarchy like in the picture I attached
The html that builds that hierarchy is attached below. If the html for the hierarchy can fit on a single page there are no issues, but once the hierarchy grows such that it needs extra pages I get an error like in the picture
I inspected the source code of pagedjs and the error seems to be thrown at line 171 inside layout.js
// Only check x characters
if (length >= this.maxChars) {
this.hooks && this.hooks.layout.trigger(wrapper, this);
let imgs = wrapper.querySelectorAll("img");
if (imgs.length) {
await this.waitForImages(imgs);
}
newBreakToken = this.findBreakToken(wrapper, source, bounds, prevBreakToken);
if (newBreakToken && newBreakToken.equals(prevBreakToken)) {
// HERE
console.warn("Unable to layout item: ", node);
return undefined;
}
if (newBreakToken) {
length = 0;
}
}
It seems that If I replace the funny characters in the hierarchy with empty spaces it works fine. I believe that the real issue is about those characters.