View Single Post
Old 05-10-2025, 04:42 PM   #6
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,920
Karma: 6240958
Join Date: Nov 2009
Device: many
Nicely done! Effectively treating th, and td, as non-structural nodes only for layout.

Extra credit is available for designing a set of user settable options stored in a prettify.ini file (or xml file or json file or whatever is easier to access from C++) if found at the root of Sigil Preferences directory for this table modification and line spacing control.

If it works and people are interested, I will add it.

But note, speed with the GumboInterface is essential and critical as it is heavily used for updating any url when files are renamed. So looking for the prettify.ini file should be done only once at Sigil startup and somehow made readily available to gumbo without having to directly access any ini/json/xml file. It must also be multi-thread safe as Gumbo itself is run concurrently across multiple threads at once.

Perhaps a new Singleton class can be created to parse the prettify ini/json/xml file on Sigil launch in main.cpp that Gumbo can call into each time to get variables to control those options on the fly in Gumbo just in that prettify routine so as not to slow things down in other speed critical gumbo routines.

Also note that the gumbo prettify routine is re-entrant and is invoked recursively.

In the end hard coding your own values in GumboInterface may be alot easier!

Last edited by KevinH; 05-10-2025 at 05:02 PM.
KevinH is offline   Reply With Quote