Fix PDF quote anchoring only testing a single page
The `findInPages` function was supposed to search for a quote looking at each of the page indexes in the input array, in order. However because of the way that `next` was used, this function ended up only searching the first page in the list. The `then(attempt, next)` code was intended to try the current page and then move to the next in the list if no match was found. However the `next` function is not called if `attempt` throws in this context. The `pdfContent` var in the test was renamed to `pdfPages` for clarity.
Showing
Please register or sign in to comment