View Single Post
Old 07-23-2014, 10:56 AM   #84
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,928
Karma: 6361444
Join Date: Nov 2009
Device: many
Hi Doitsu,

My guess is, it assumes that when it says "regenerate" it, you already know it will throw out everything there and build a new one by parsing for titles in each xhtml page, and the contents of h1, h2, etc, tags.

But not everyone thinks of "regeneration" in the same way. So, I agree, if the ncx exists, it should warn you that everything in the ncx will be lost upon regeneration and ask you if you want to continue.

That is something I can look creating a patch for when I get some free time.

Take care,

KevinH


Quote:
Originally Posted by Doitsu View Post
I don't know if Sigil uses the XML version of Tidy when generating/formatting the .ncx file, but I've noticed that it'll delete manually inserted <pageList> nodes if the user regenerates the NCX TOC via Generate Table of Contents...
(You can test this with my pageList test file from the KindleUnpack thread.)

I understand that changing the NCX code so that it'll preserve existing <pageList> nodes isn't really worth the effort, since hardly anybody is using pageLists anyway, but it would be nice to have Sigil at least display a deletion warning if the user selects Generate Table of Contents... from the menu and the .ncx file contains <pageList> nodes (or other non-TOC nodes).
KevinH is offline   Reply With Quote