View Single Post
Old 08-06-2024, 10:17 AM   #441
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 7,000
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
New Test Version

2024-08-06
- Keep order of non-anchor TOC entries to the same file.
- Update Translations

Hmmm. I think I see what's going on here, but without seeing the source epub, I'm speculating a bit.

TOC entries can point to an HTML file in general, or a specific anchor tag inside an HTML file.

The code that collects multiple TOC entries pointing to the same HTML file specifically puts file-pointing entries at the start of the list to make sure they 'win' if there are anchor-pointing entries to the same HTML file in the TOC before the file-pointing entries. (A TOC is not required to be linear.)

This had the unintended affect of reversing the order when there's more than one TOC entry pointing to the same HTML file without anchors.

The attached test version addresses that issue. If it doesn't fix your (sptau's) problem, I'll need to see the source epub.

Last edited by JimmXinu; 08-13-2024 at 03:20 PM. Reason: remove obsolete test version
JimmXinu is offline   Reply With Quote