![]() |
#16 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
#17 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 |
![]() |
![]() |
Advert | |
|
![]() |
#18 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
#19 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
#20 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
Advert | |
|
![]() |
|
![]() |
||||
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 |