View Single Post
Old 04-15-2015, 11:16 AM   #4
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
ok at my PC now here is how I'd do it with Sigil
1. highlight a relevant fragement e.g. this from your example
</p>
<p class="calibre1">h

2. paste that into the find part of the regex. (pasting it as-is will take care of the space between lines issue. )
3. now replace that closing h with ([a-z]) so that it matches any lower case
the replace string for the regex is (blank space)\1

what that all does is removes the closing tag + the next opening tab & 1st letter, and then puts back the initial opening letter, preceded by a blank space.
test it carefully and make a backup before you "replace all" !

outside of poetry and titles, there's no valid reason for a paragraph to begin with lower case, so that will fix most issues.

you can still get awkward cases like
then he said,
"this"


but go can extrapolate code as needed for those
cybmole is offline   Reply With Quote