PagedJS crashes when document contains duplicate text nodes
Hi team!
I am using Chromium 100
and pagedjs@0.4.3
and have faced the follows issue. If an html document contains repeated text nodes, PagedJS crashes with the error "Layout repeated at: <text node>".
After that the final pdf contains phantom pages where content from the first pages is duplicated. It looks like indexOfTextNode
method calculates index of text node based on its text value only. But if there are several identical blocks, it selects the first one and this causes pagination failure.
Source HTML fail.html
Final PDF result.pdf