Thread: Move text/code
View Single Post
Old 08-30-2025, 08:12 PM   #1
Dragen
Member
Dragen began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Feb 2012
Device: Kobo
Move text/code

Hello.

I'm doing a project, where I intend to make a whole series look the same because, sadly, the publisher decided it would look good to have different styles in various entries of the series.

But I've hit a snag. In most of the books, the first letter of the chapter is stylized.
Example:
Code:
<p class="flushleft"><span class="gray">T</span>he castle stood on rising ground half a kilometre from the river.</p>
Which is what I want.

But in some books, the publisher decided it would stylize a few words instead.
Example:
Code:
<p class="flushleft"><span class="gray">The castle stood</span> on rising ground half a kilometre from the river.</p>
And the perfectionist in me can't have that.

Is there a way to automate moving </span> in the first p-line in each chapter to after the first letter (and also ignoring symbols like ')?
Dragen is offline   Reply With Quote