View Single Post
Old 06-08-2018, 03:40 PM   #23
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,860
Karma: 6120478
Join Date: Nov 2009
Device: many
And to make matters worse, turning on italic and then off in BookView (or any other styling) will randomly cause the inclusion or removal of these implicit null string nodes in the webpath.

Here is an example webpath from Qt for the word "history":

Debug: webpath: "html 1,body 1,p 1,#text -1"

Adding one to the counts following each piece will tell you which child to use when only counting preceding siblings that are element nodes (not text nodes).

If you then play around with italics on that word and switch back (even though the cursor is still on the word "history", you get this path instead:

webpath: "html 1,body 1,p 2,#text -1"

And there are only two children in total of that particular p tag so that makes no sense.

This is all caused by live editing in BookView inserting and removing strange nodes in the tree that makes converting the BookView Dom location back to a CodeView DOM location quite hard.

Argh! I really am beginning to really hate BookView!
KevinH is offline   Reply With Quote