12-08-2023, 11:27 PM | #181 | ||
Witchman
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
@DNSB
Quote:
Quote:
Last edited by slowsmile; 12-08-2023 at 11:50 PM. |
||
12-08-2023, 11:56 PM | #182 |
Witchman
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
@DNSB . . . Just to clarify -- yet again!! -- that Remove empty span is a plugin dialog option that you can choose to run or not run. That option is in the second plugin dialog at the bottom of the options list. And if running that option is causing you problems then don't use it. And the other option you have is to remove all those useless and redundant tags surrounding those blank spaces, which really serves no earthly purpose anyway and then you will be able to run the Remove empty span option without any problems.
Last edited by slowsmile; 12-09-2023 at 12:34 AM. |
Advert | |
|
12-09-2023, 02:06 AM | #183 |
Witchman
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
@DNSB . . . This is the before code, in your last example:
Code:
<p>This is a test <span class="italic"> </span>for<span class="italic"> spaces </span>inside a tag.</p>
Code:
<p>This is a test for <span class="italic">spaces</span> inside a tag.</p>
Last edited by slowsmile; 12-09-2023 at 02:08 AM. |
12-09-2023, 02:39 AM | #184 |
Witchman
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
@DNSB . . . Here are some examples of correct plugin usage:
Before running the plugin: Code:
<p><em>This is a test for correct plugin usage and behaviour.</em></p>
Code:
<p>This is a <em>test</em> for correct plugin <em>usage</em> and <em>behaviour.</em></p>
Then I set the Convert <i>, <b>, <em, <u>, <s> and <strong> tags to span styling. option and ran the plugin again and got: Code:
<p><span style="font-style: italic;">This is a test for correct plugin usage and behaviour.</span></p>
Code:
<p>This is a <span style="font-style: italic;">test</span> for correct plugin <span style="font-style: italic;">usage</span> and <span style="font-style: italic;">behaviour.</span></p> If the tags are correctly used in html as shown above -- without surrounding blank space with tags -- then you will get a good plugin result. Last edited by slowsmile; 12-09-2023 at 02:41 AM. |
12-09-2023, 06:45 PM | #185 | |
Bibliophagist
Posts: 35,464
Karma: 145525534
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
In your sample, you added a space before the <span class="italic"> </span>. My code: Code:
This is a test<span class="italic"> </span>for Code:
This is a test <span class="italic"> </span>for ↑ note the extra space here Last edited by DNSB; 12-09-2023 at 06:49 PM. |
|
Advert | |
|
12-10-2023, 03:30 AM | #186 |
Witchman
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
@DSNB . . . I ran my plugin again(more than once) on the same code as you in my test epub:
<p>This is a test <span class="italic"> </span>for<span class="italic"> spaces </span>inside a tag.</p> I even made sure to download and install the recently updated plugin(now at v0.5.5) in Sigil before running the plugin on the above code and I got this result: <p>This is a test for <span class="italic">spaces</span> inside a tag.</p> After plugin run please note in the result that the first <span> with blank space has been completely removed with a single blank space at the start of the second <span>. This is correct plugin behaviour. Unfortunately, I've run all the same tests that you've run and I'm sorry but I am still unable to emulate your extra-blank-space problem when using the plugin. I also released a new plugin update(v0.5.5) yesterday. Are you using the updated plugin? Last edited by slowsmile; 12-10-2023 at 04:41 AM. |
12-10-2023, 04:32 AM | #187 | |
Witchman
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
@DNSB,
Quote:
Code:
<span class="italic"> </span>
Code:
<span class="italic/>
Code:
[COLOR="Black"]<h1><a id="toc5886890"></a>CHAPTER 1</h1>
Code:
[COLOR="Black"]<h1><a id="toc5886890"/>CHAPTER 1</h1>
Last edited by slowsmile; 12-10-2023 at 04:58 AM. |
|
12-10-2023, 05:15 AM | #188 | |
Witchman
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
@DNSB,
Quote:
Well, for goodness sake, if you actually admit that styling a blank space using <span> tags is indeed a useless and pointless thing to do then why on earth are YOU doing that in your HTML code in Sigil and then insisting that it's a plugin problem? Last edited by slowsmile; 12-10-2023 at 06:43 AM. |
|
12-10-2023, 07:49 AM | #189 |
A Hairy Wizard
Posts: 3,095
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Slowsmile: it is a client’s PROGRAM that is automatically doing this. He isn’t manually doing it…
Regardless of the cause of the styled space, he is simply saying that your plug-in is removing those styled spaces entirely. Last edited by Turtle91; 12-10-2023 at 07:52 AM. |
12-10-2023, 02:02 PM | #190 | |
Bibliophagist
Posts: 35,464
Karma: 145525534
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
I see this when I run CustomCleanerPlus on an epub all by itself after clicking clear all so no options are selected. Code:
<p>This<span class="italic" id="kofu0"> </span>is<span class="italic" id="kofu1"> </span>a<span class="italic" id="kofu2"> </span>test<span class="italic" id="kofu3"> </span>for</p> Code:
<p>This<span class="italic" id="kofu0"/>is<span class="italic" id="kofu1"/>a<span class="italic" id="kofu2"/>test<span class="italic" id="kofu3"/>for</p> This is a test for Preview after: Thisisatestfor I do have a search that looks for tagged space(s) and removes the tags but your code removes the space but not the tags which is wrong in so many ways. |
|
12-10-2023, 08:50 PM | #191 | ||
Witchman
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
@DNSB,
Quote:
Your preview before code: Code:
<p>This<span class="italic" id="kofu0"> </span>is<span class="italic" id="kofu1"> </span>a<span class="italic" id="kofu2"> </span>test<span class="italic" id="kofu3"> </span>for</p>
Code:
<p>This <span class="italic" id="kofu0"/>is <span class="italic" id="kofu1"/>a <span class="italic" id="kofu2"/>test <span class="italic" id="kofu3"/>for</p>
This is a test for And here is the text after preview: This is a test for There doesn't seem to be a problem on my side after I run the plugin in a test epub with your code. Quote:
This has been going on for long enough and it's probably best if I end this now by saying that I am no longer interested on fixing your plugin problem. Reasons below:
Last edited by slowsmile; 12-10-2023 at 09:49 PM. |
||
12-10-2023, 10:40 PM | #192 | |
Witchman
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
@Turtle91,
Quote:
And, anyway, I've already said in several previous posts, that I can't emulate or reproduce his <span> problem, so how can I fix it ??? And as I've also been saying in previous posts -- this plugin is a "clean up" plugin, not a "fix-it" plugin. One reason @DNSB and I are getting different results with the plugin might well be because @DNSB is using a different plugin version than me. I'm currently using the most recently released v0.5.5 plugin version. And so far I've twice asked @DNSB what plugin version he is using with no response. What more can I do? Last edited by slowsmile; 12-10-2023 at 11:12 PM. |
|
12-10-2023, 11:49 PM | #193 |
Bibliophagist
Posts: 35,464
Karma: 145525534
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
For what it's worth, I updated to v0.5.5 when it was released. As part of my testing, I also spun up several virtual machines where I installed Sigil and CustomCleanerPlus v0.5.5. I saved an epub3 version of my test line. When I ran CustomCleanerPlus on my test epub, I got the same result on all 3. No other plugins were installed on those three VMs.
Please note that this behaviour is consistent with any of the tags I tested surrounding a space and even when I tried <div> </div> which was collapsed to <div/>. See the attached images for the before (Mac OS Sonoma 14.1.2 only) and the post CCPlus run on all three VMs. I still believe that removing the tags and leaving the spaces would be the correct behaviour while the actual behaviour of removing the spaces and collapsing the tags in incorrect. |
12-11-2023, 12:05 AM | #194 |
Bibliophagist
Posts: 35,464
Karma: 145525534
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Just for the heck of it, I did a bit more testing by duplicating the content of the test epub, removing the classes and ids and moving the space outside the tags. Oddly, the results were pretty much the same, the tags were collapsed and not removed.
|
12-11-2023, 12:11 AM | #195 |
Witchman
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
@DNSB,
When I ran the plugin with no options on this simplified code: Code:
<p>This <span> </span>is a test for</p>
Code:
<p>This <span/>is a test for</p>
And as I've also described in a previous post -- it's probably my use of python's BeautifulSoup(BS) module that's causing the double span tag with blank space to convert to single span tag format with no blank space. And nowhere in my BeautifulSoup code am I deliberately trying to convert to single tag format. So, unfortunately, I can't fix the above problem -- because it's a BeautifulSoup problem. I tried another simple test to confirm my findings. I added a horizontal rule with a blank space to the EPUB like this: Code:
<hr> </hr>
Code:
<hr/>
And just to clarify that the above span problem seems to be normal BeautifulSoup behaviour for any tag like <a>, <hr> or <span> that contains just a blank space. And, like I've said, I can't fix that problem if the cause is inside python's BeautifulSoup module. So your only option appears to be to manually remove all of those useless single tag span entities in Sigil using search and replace. Last edited by slowsmile; 12-11-2023 at 12:32 AM. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[FileType Plugin] YVES Bible Plugin | ClashTheBunny | Plugins | 27 | 01-16-2023 01:25 AM |
Problem with my ScrambleEbook plugin and the Plugin Updater tool | jackie_w | Development | 14 | 01-19-2017 10:49 PM |
Plugin not customizable: Plugin: HTML Output does not need customization | flyingfoxlee | Conversion | 2 | 02-24-2012 02:24 AM |
[GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 12:27 PM |
New Plugin Type Idea: Library Plugin | cgranade | Plugins | 3 | 09-15-2010 12:11 PM |