![]() |
#1 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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> Code:
<p>Space<br/>The Final Frontier<br/>These are the voyages of the starship Enterprise.</p> Code:
<p>Space<br/> The Final Frontier<br/> These are the voyages of the starship Enterprise.</p> 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. |
![]() |
![]() |
![]() |
#2 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,760
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. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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> Code:
<p>Test<br/> continuation</p> So you just need to remove these spaces yourself, and another prettifying will not break your code. |
![]() |
![]() |
![]() |
#4 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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! |
![]() |
![]() |
![]() |
#5 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,760
Karma: 5706256
Join Date: Nov 2009
Device: many
|
And of course, a quick find and replace all will make things as you like them.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,745
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#7 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,760
Karma: 5706256
Join Date: Nov 2009
Device: many
|
|
![]() |
![]() |
![]() |
#8 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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! |
![]() |
![]() |
![]() |
#9 |
Connoisseur
![]() 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 />- |
![]() |
![]() |
![]() |
|
![]() |
||||
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 |