Quote:
Originally Posted by Tex2002ans
I have explained this exact "broken paragraphs" question many times over the years.
Here are 4 such topics where I go step-by-step and break down the Regular Expressions:
[LIST][*] 2021: "Regex examples"
- (Especially my Post #689+.)
...
|
From that 2021 post:
Quote:
Search: -</p>\s+<p>
Replace: <--- (Completely blank)
and:
Search: ([^>”\?\!\.])</p>\s+<p>
Replace: \1 <---- (There's a space after the '1')
and:
Search: <p>[a-z]
Replace: <---- (BLANK. Only use for FINDING, NOT REPLACING.)
|
I don't know if Sigil is different from Calibre in this regard (the post is in the Sigil forum), but if the last search (for lowercase starting paragraphs) is saved in Calibre, make sure to check the "Case Sensitive" box.
Also, a question for the first ("hyphen") rule. Most of the books I edit have a tendency to end interrupted paragraphs with a dash:
Code:
<p>"Here I am wal-</p>
<p>The monster leaped out and ate my face.</p>
Stylistically, should the dash be replaced with something else (to signify an interruption)? Or, just leave it?
EDIT: And, wouldn't the first rule be covered by the second? Are you just separating them to pull the hyphen issues out of the mass?