Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 01-26-2021, 08:52 PM   #16
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,439
Karma: 5703082
Join Date: Nov 2009
Device: many
Actually any naked text in the body tag, will make the prettify code I wrote a while back mess up a bit. Luckily the days of having text directly in the body tag should be pretty rare.

If for example you wrap that text "|" in any tag including a simple <span> the prettify should no longer add extra space that will never show up in the xhtml version.
KevinH is offline   Reply With Quote
Old 01-27-2021, 09:43 AM   #17
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,439
Karma: 5703082
Join Date: Nov 2009
Device: many
I think I have a way to fix this without impacting anything else. I will give that a try.

Update:

Pushed a fix to master for repeated prettyprint of bare text in the body tag.

Last edited by KevinH; 01-27-2021 at 11:09 AM. Reason: added update
KevinH is offline   Reply With Quote
Advert
Old 01-28-2021, 06:57 AM   #18
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 808
Karma: 2416112
Join Date: Jan 2017
Location: Poland
Device: Various
If the file was previously "prettified" then the changes are subtle, in most files there is no difference. After applying "Mend & Prettify Code - All HTML Files", there was not even an asterisk next to the file name, which means that the command made absolutely no changes.

Unfortunately, it's not good. Because eg multiple spaces and line breaks in paragraphs remain in the code, which contradicts "prettification".

Bare text is less important than the one in paragraphs.
So although some elements of "prettification" may or may not be subjectively liked, it was better before.
BeckyEbook is offline   Reply With Quote
Old 01-28-2021, 09:26 AM   #19
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,439
Karma: 5703082
Join Date: Nov 2009
Device: many
Your latest suggested fix, seems to work properly. Where are you seeing problems still? Please provide a specific example and what you expected to see but do not?

Please remember multiple newlines and multiple spaces are ignored by Preview so whitespace and breaks are added to make the code itself more readable but should not impact what is seen in Preview in any way.
KevinH is offline   Reply With Quote
Old 01-28-2021, 12:12 PM   #20
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,439
Karma: 5703082
Join Date: Nov 2009
Device: many
Given your change, the only way multiple spaces can exist inside a paragraph is because they are wrapped in non-structual tags, so perhaps we need to add "is_inline" to your change as they used to be the only ones not being condensed that were previously.

I will give that a try.

Actually p tags are part of the Other_text_holders class. So that would not help.

So I am going to stop restricting things and only test for keepwhitespace or not when deciding to condense text.

I will push that for testing.


Kevin

Last edited by KevinH; 01-28-2021 at 12:26 PM.
KevinH is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindle Template Problems Splitting Authors Names D.. Library Management 9 12-06-2020 10:56 AM
Splitting files LeonidasM Sigil 20 12-09-2017 12:47 PM
Renaming when splitting files rubeus Sigil 5 01-28-2016 12:32 PM
splitting html files? NASCARaddicted ePub 8 01-22-2013 04:13 AM
Splitting files... or something? *Angie* Calibre 4 09-14-2009 07:42 PM


All times are GMT -4. The time now is 09:26 AM.


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