@DNSB,
Quote:
"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. "
|
When I test your code with my plugin with no options set, only the <span> tags are removed and the spaces remain. See below.
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>
After I run the plugin wiith no options set, I get:
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>
Here is the text before preview:
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:
"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. "
|
As I've already said, in my testing of your code the plugin removes only the <span> tags and
not the space, which is correct plugin behaviour.
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:
- I can't fix your problem because I cannot emulate or reproduce your problem at my end.
- You are complaining that my plugin is behaving badly in spans that just surround blank spaces. As I've already said, that's poor coding and I don't care whether the code was created by you or anyone else -- you own it, so you should fix it!
- My "clean up" plugin is not supposed to fix poor code. The plugin should only be used or run to remove dross code and to assure EPUB compliance with some extra options for the plugin user.
- I have recently released and broadcast a plugin update(v0.5.5) on this thread and I've asked you -- several posts ago -- whether you were using that version or not. You didn't respond. You should be using v0.5.5. Using a different plugin version to mine might well be the reason why we are getting different results.
- With no options set, the plugin is designed to remove span tags that surround nothing or that surround just spaces. So if you have spaces surrounded by span tags in the html then only the span tag will automatically be unwrapped and removed because surrounding a space or spaces with a span tag serves no useful purpose. That's proper plugin behaviour by the way.
- I also will not fix your problem because it would probably benefit no one else but you. If I do a requested change or fix then, to make it worthwhile, I much prefer that it benefits as many people as possible and not just one person who has a singular problem that has actually been caused by someone's poor <span> coding.