View Single Post
Old 12-06-2023, 03:51 AM   #166
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. . .Thanks for that, I think I see the reason for your spacing problem now.

In your example, you are initially running the plugin with this html code in your epub:

Code:
<body>
  <p>This<i> </i>is<i> </i>an<i> </i>italic<i> </i>sentence.</p>
</body>
And what you've done is surround each horizontal space in your example text like this:<i> </i>. Why on earth have you done that? Why have you tried to italicize all the blank spaces in your sentence? There will be no effect in other words because you cannot italicize a horizontal blank space, right? And as well, no one would ever try to italicize a blank space like that because it would have no effect at all!

. . . And the reason the blank spaces in your example text are disappearing and your text is joined is because the plugin also automatically converts all <i> </i> tags to <span> tags like this:

Code:
<body>
  <p>This<span style="font-style: italic;"> </span>is<span style="font-style: italic;"> </span>an<span style="font-style: italic;"> </span>italic<span style="font-style: italic;"> </span>sentence.</p>
</body>
. . . And then, later on in the plugins' run, it automatically removes all empty <span></span> tags containing no text as well as removing </span> </span> tags that only contain blank spaces, which leaves all the text in your example joined without spaces. And all that is correct behaviour for the plugin because no one in their right mind would ever seriously try to italicize the blank horizontal spaces in their published ebook, right?

If you were to initially and correctly italicize the whole of your example sentence, it would do it like this:

Code:
<body>
  <p><i>This is an italic sentence.</i></p>
</body>


. . . And after running the plugin you would get this:

Code:
<body>
  <p><span style="font-style: italic;">This is an italic sentence.</span></p>
</body>

Last edited by slowsmile; 12-06-2023 at 04:30 AM.
slowsmile is offline   Reply With Quote