View Single Post
Old 12-21-2020, 08:17 PM   #26
AlanHK
Guru
AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.
 
AlanHK's Avatar
 
Posts: 681
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
Quote:
Originally Posted by Tex2002ans View Post
Search: (“[^”<]+”)
Replace: <b>\1</b>

That will work for most cases. But not if a speech goes over several paragraphs. Then only the final para has a close quote.
In that case the <b> codes will overlap the <p> and you'll have a syntax error.
Don't know about Calibre, but in Sigil, F7 check will list all these and you can fix them manually by adding </b> to the end of paras and <b> to the opening quotes of intermediate ones.

I can't think of a way to completely automate this. I'd just do
Search:Replace: <b>“
Search:Replace: ”</b>

That will also screw up with extended speech, but simpler to fix as you just have to add closing </b> to intermediates paras.
AlanHK is offline   Reply With Quote