Quote:
Originally Posted by Serpentine
I have some regex saved here which does a better job than smarty most of the time (or at least I've not run into bad cases). It needs some translation from GJSoft to PCRE - but I can do that a bit later if you are still looking for a way to do it.
Only thing I can think of is that it doesn't like multi-paragraph quotes. There's an easy way to find those tho.
|
Yes, situations when there isn't always a closing quote is almost always going to cause issues with any automated script. Also apostrophes at the beginning of a word (like 'tis) are problematic for smarty as well (since there's no programmatic way to determine that it's just not an opening single quote). But overall, I've found it to do a much better job (not to mention quicker and easier) with double/single quotes, mdashes, ellipses than any regex I've come across (or come up with).
If you get it ported to PCRE, I'd certainly like to see it. It's always preferable to stay within Sigil if I possibly can. But whatever it is, it's going to have to work in code view (which means excluding the quotes around tag attributes) since Find & Replace in BV is just not practical/advisable with Sigil.