Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 04-05-2022, 05:07 PM   #1
Vanguard3000
Groupie
Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.
 
Posts: 168
Karma: 474196
Join Date: Jan 2011
Location: Canada
Device: Kobo Libra 2
Space after <br/> tag when prettifying.

Hey all,

Since Sigil 1.9, I've noticed that when prettifying code, a <br/> tag at the end of a line will combine onto one line as expected, but there will be a space after the tag.

For example:
Code:
<p>Space<br/>
The Final Frontier<br/>
These are the voyages of the starship Enterprise.</p>
Expected:
Code:
<p>Space<br/>The Final Frontier<br/>These are the voyages of the starship Enterprise.</p>
Actual:
Code:
<p>Space<br/> The Final Frontier<br/> These are the voyages of the starship Enterprise.</p>
Is there a reason for this change? Is it something I can adjust (short of reverting to an older Sigil version)? As it is when prettifying a new ebook I now have to do a find/replace to remove that space to satisfy my anal retentiveness.

Obviously it's not a killer problem or anything; I just preferred it when the space wasn't inserted, and am wondering if there's a way to make it not happen.

Thanks in advance for any info, and happy First Contact Day!

Last edited by Vanguard3000; 04-05-2022 at 05:26 PM. Reason: Added closing </p> tags to code examples.
Vanguard3000 is offline   Reply With Quote
Old 04-05-2022, 05:17 PM   #2
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,761
Karma: 5706256
Join Date: Nov 2009
Device: many
Haven't touched that code in years.

And as far as I am concerned, that is no bug. That space is the converted new line after the <br/> in your example.

HTML converts new line into simple white space when not in pre. The prettifier does the same.


What older version of Sigil are you using that works the way you describe (no space added)?

Last edited by KevinH; 04-06-2022 at 09:20 AM.
KevinH is online now   Reply With Quote
Advert
Old 04-06-2022, 03:28 AM   #3
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: 839
Karma: 2657572
Join Date: Jan 2017
Location: Poland
Device: Various
@Vanguard3000:
The changed code appeared in Sigil version 0.9.2 in December 2015.

Indeed, prettifying your example produces spaces, but this happens naturally – by condensing white spaces, of which only one remains, just the one after the <br/> tag.

If Sigil were to prettify such a code:
Code:
<p>Test<br/>continuation</p>
to:
Code:
<p>Test<br/> continuation</p>
... You could think of it as inserting "unnecessary" space.

So you just need to remove these spaces yourself, and another prettifying will not break your code.
BeckyEbook is offline   Reply With Quote
Old 04-06-2022, 11:35 AM   #4
Vanguard3000
Groupie
Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.
 
Posts: 168
Karma: 474196
Join Date: Jan 2011
Location: Canada
Device: Kobo Libra 2
I wasn't reporting it as a bug, just wondering if it was something I could adjust, but it makes sense that it would be the correct behaviour for condensing whitespace. I reinstalled 1.7 to check and it works like this as well, so I must have misremembered it as being a new behaviour.

Anyway, thanks to you both for clarification!
Vanguard3000 is offline   Reply With Quote
Old 04-06-2022, 12:45 PM   #5
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,761
Karma: 5706256
Join Date: Nov 2009
Device: many
And of course, a quick find and replace all will make things as you like them.
KevinH is online now   Reply With Quote
Advert
Old 04-06-2022, 01:11 PM   #6
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,750
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Vanguard3000 View Post
I wasn't reporting it as a bug, just wondering if it was something I could adjust, but it makes sense that it would be the correct behaviour for condensing whitespace. I reinstalled 1.7 to check and it works like this as well, so I must have misremembered it as being a new behaviour.

Anyway, thanks to you both for clarification!
You could have a look at the code and see if you can find where it does this and fix it and give the fix to be added.
JSWolf is offline   Reply With Quote
Old 04-06-2022, 01:17 PM   #7
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,761
Karma: 5706256
Join Date: Nov 2009
Device: many
Easier said than done if you are not good with C++ and as I said, it is not a bug, so no "fixes" would be accepted.

Quote:
Originally Posted by JSWolf View Post
You could have a look at the code and see if you can find where it does this and fix it and give the fix to be added.
KevinH is online now   Reply With Quote
Old 04-06-2022, 05:33 PM   #8
Vanguard3000
Groupie
Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.
 
Posts: 168
Karma: 474196
Join Date: Jan 2011
Location: Canada
Device: Kobo Libra 2
It's been a while since I've used C++; I probably could figure out how to add an exception for non-wrapping tags, but it makes sens to me now that the logic remain consistent. I'll probably just stick with a F&R after prettifying.

Thanks, everyone!
Vanguard3000 is offline   Reply With Quote
Old 04-08-2022, 02:57 AM   #9
Binchen
Connoisseur
Binchen began at the beginning.
 
Posts: 57
Karma: 10
Join Date: Jul 2021
Device: Abakus
As far as i remeber this was introduced several versions ago to capture the probelm in the ncx files.

<h1>This is<br />a Heading</h1>

Outcome in ncx: This isa Heading

<h1>This is<br /> a Heading</h1>

Outcome in ncx: This is a Heading

It just saves you time not in the need to add blanks if your headings contains <br />-
Binchen is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Tag Mapper: Remove tag if another specific tag exists? ownedbycats Library Management 2 07-23-2020 10:32 PM
Free (Kindle) Space Probe by Alan David [Sci-Fi Business vs Pirates Space Opera] ATDrake Deals and Resources (No Self-Promotion or Affiliate Links) 0 11-17-2017 04:47 AM
Free (Kindle) Space Trap by Juanita Coulson [Vintage SF Alien Contact Space Opera] ATDrake Deals and Resources (No Self-Promotion or Affiliate Links) 13 09-21-2017 12:44 PM
Add space between <br> tag kakkalla Conversion 9 02-29-2012 11:02 PM


All times are GMT -4. The time now is 07:39 PM.


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