Quote:
Originally Posted by roger64
But the predictable pattern is that there can be from one to four successive to enclose within a div.
|
I'm petty sure that there's a more elegant solution, but I'd use a simple two step approach in Sigil (I'm not sure if this works with Calibre Editor):
1. Insert opening <div> before first quote paragraph:
Find:
<p>(.*?)</p>\s*<p class="quote">
Replace:
<p>\1</p>\n<div class="quote">\n<p class="quote">
2. Insert closing </div> after last quote paragraph:
Find:
<p class="quote">(.*?)</p>\s*<p>
Replace:
<p class="quote">\1</p>\n</div>\n<p>
Obviously this only works if there's at least one non-quote paragraph before the first and after the last quote paragraph.