Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Position coincident page marks in the correct order (#1274)
* Position coincident page marks in the correct order If Pg123 and Pg124 were at the same location in the file, usually because Pg123 is blank, then when the page locations are loaded from the bin file and positioned in the text widget using "marks", the mark for Pg124 was inserted at the location where Pg123's mark was, and ended up before it in the text widget's internal list of marks. Loading the marks in reverse order means that coincident marks appear in alphanumeric order, which is preferable. This was assumed to be the case by the HTML generation code when set to skip coincident pagenum spans. So this fixes #1272 * Revert "Position coincident page marks in the correct order" This reverts commit f366b5e. * Sort pagemarks correctly when adding HTML pagenums Although `markNext` iterates through the marks in order of their location, it does not guarantee an order when two marks have the same location. This could lead to some page numbers that directly followed blank pages not being output to the HTML file. To resolve it, just sort a list of page markers and use that, rather than iterating through the markers in the file. Fixes #1272
- Loading branch information