View Single Post
Old 06-12-2018, 01:25 PM   #4
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,859
Karma: 6120478
Join Date: Nov 2009
Device: many
Yes this is a bug. Every edited xhtml file is saved saved by focus moving or even pausing long enough.

The problem is that the nav must remain machine readable at all time as it provides the navigation toc. If you look at NavProcessor.cpp, it tries to parse the current nav and if for any reason it can not find a nav tag with epub:type equal to toc, it assumes the nav is "garbage" and tries to rebuild or replace it.

The problem is something is making focus move out of the nav's tab during intermediate typing and anything that is incomplete is making the Nav fail parsing and causing it to reject the nav and replace it.

This is obviously a bug. I either have to find out what is causing focus to move which in turn makes the incomplete file be saved and then the NavProcessor fail in its parse attempt.

I will look into either more robust parsing methods, or using gumbo to fix things first on the fly before parsing by NavProcessor to try to prevent this from happening.

Thanks for the bug report.

KevinH
KevinH is offline   Reply With Quote