View Single Post
Old 12-10-2023, 05:32 AM   #187
slowsmile
Witchman
slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.
 
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
@DNSB,
Quote:
"Unfortunately, when I run the plugin, the tags surrounding the blank spaces removed are not removed (see in my sample where <span class="italic"> </span> is converted to <span class="italic/> without the space. So when I preview the text, I see testfor instead of test<space>for."
Nowhere in my plugin do I deliberately convert spans containing blank spaces from this:
Code:
<span class="italic"> </span>
To a single span like this:
Code:
<span class="italic/>
I have also seen ids written written in HTML code like this:
Code:
[COLOR="Black"]<h1><a id="toc5886890"></a>CHAPTER 1</h1>
. . . which are automatically changed to this when acted upon by python's BeautifulSoup module:
Code:
[COLOR="Black"]<h1><a id="toc5886890"/>CHAPTER 1</h1>
I use the BeautifulSoup module alot in my plugin. It therefore seems that BeautifulSoup tends to automatically convert a standard double tag to single tag format if the <span> contains no actual text. I don't think I can fix that one because that problem seems to be caused by a quirk in Python's BeautifulSoup module. But as I've already mentioned in a previous post, if you simply make sure to avoid surrounding just blank spaces with <span> tags then you wouldn't have that problem would you?

Last edited by slowsmile; 12-10-2023 at 05:58 AM.
slowsmile is offline   Reply With Quote