Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 06-10-2021, 12:07 PM   #61
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 24,123
Karma: 163500000
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Tex2002ans View Post
It even happens back in Sigil 0.9.14, so it has existed for a while.
Thanks for checking. I suspected it wasn't new at all. Might be something in my refactored Heading QToolButton code to eliminate the deprecated QSignalMapper. But the very similarly reworked Case QToolButton code still works as it should, sooooo. Gotta dig deeper.
DiapDealer is offline   Reply With Quote
Old 06-10-2021, 01:08 PM   #62
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 24,123
Karma: 163500000
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Got an idea what it is, but I'm limited to looking at code on github at the moment. Once a new tag pair has been encountered after an hr tag, the problem is eliminated again.

Last edited by DiapDealer; 06-10-2021 at 01:35 PM.
DiapDealer is offline   Reply With Quote
Old 06-10-2021, 01:57 PM   #63
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: 5,444
Karma: 3512746
Join Date: Nov 2009
Device: many
You have to be on bare text with no tag , a heading tag, or a paragraph tag for the heading tool to work. It will not replace a hr tag if that is what you are trying.
KevinH is offline   Reply With Quote
Old 06-10-2021, 01:59 PM   #64
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: 5,444
Karma: 3512746
Join Date: Nov 2009
Device: many
Still not exactly sure what is going on? Check out those actions being enabled or disabled?

Okay, I can recreate this as well. The enable code seems to falter because hr is a self closing tag.

If I replace <hr/> with <hr></hr> (legal in xhtml) then it all functions just fine.

I tried with other normally self closed tags like <img/> and it functioned just fine.

The problem only seems to happen with hr tags that are single. I wonder if the code is seeing a two character tag starting with h and getting confused with it and headers?

Edit: After more tests it only does not work with hr that is self closed. It works after a self-closed br and even made up self-closed tags like hrr or vhr or h or even hv.

The problem seems to be specific to self-closed hr tags only.

That is very strange!

Last edited by KevinH; 06-10-2021 at 02:17 PM.
KevinH is offline   Reply With Quote
Old 06-10-2021, 02:17 PM   #65
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 24,123
Karma: 163500000
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
The problem only seems to happen with hr tags that are single. I wonder if the code is seeing a two character tag starting with h and getting confused with it and headers?
That's exactly what's happening.

https://github.com/Sigil-Ebook/Sigil...ndow.cpp#L3701

https://github.com/Sigil-Ebook/Sigil...ndow.cpp#L5073

I'm just not certain why tab->GetCaretElementName() seems to be returning hr when the cursor is clearly outside of the hr tag.

Last edited by DiapDealer; 06-10-2021 at 02:30 PM.
DiapDealer is offline   Reply With Quote
Old 06-10-2021, 02:35 PM   #66
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: 5,444
Karma: 3512746
Join Date: Nov 2009
Device: many
I think I have fixed this. The actual problem is that BLOCK_LEVEL_TAGS defined in XhtmlDoc.cpp includes "hr" as a block level stopping point but the code in CodeView FormatBlock did not handle the possibly of a BLOCK_LEVEL_TAGS being self-closed. None of the others are self-closing.

I just pushed a fix for this to master which seems to work.


Please give this a try.
KevinH is offline   Reply With Quote
Old 06-10-2021, 05:45 PM   #67
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 24,123
Karma: 163500000
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
Please give this a try.
Seems to do the trick in my testing.
DiapDealer is offline   Reply With Quote
Old 06-10-2021, 06:07 PM   #68
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: 5,444
Karma: 3512746
Join Date: Nov 2009
Device: many
That is good to know. Especially since that bug has existed for so long!
KevinH is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sigil-0.9.5 Released KevinH Sigil 68 04-09-2016 06:30 AM
Sigil-0.9.4 Released KevinH Sigil 40 03-26-2016 10:15 AM
Sigil-0.9.3 Released KevinH Sigil 56 03-03-2016 06:46 PM
Sigil-0.9.1 Released KevinH Sigil 36 12-04-2015 03:00 PM
Sigil-0.8.900 released for testing - Wait for Sigil-0.8.901 KevinH Sigil 106 10-04-2015 10:41 AM


All times are GMT -4. The time now is 12:38 AM.


MobileRead.com is a privately owned, operated and funded community.