I am now using Brad Choate’s amazing MT-Regex plugin to automatically turn my straight apostrophes curly. To do it, first install the plugin, then create a new template module called curlyquotes that contains this code:

<MTAddRegex name="apos1">s/'([dmst])([ .,?!\)\/<])/&#8217;$1$2/gi</MTAddRegex>
<MTAddRegex name="apos2">s/'([lrv])([el])([ .,?!\)\/<])/&#8217;$1$2$3/gi</MTAddRegex>

Then, in each of your templates, add this at the top:

<$MTInclude module="curlyquotes"$>

And anywhere you have this:

<$MTEntryBody$>

Change it to this:

<$MTEntryBody regex="1"$>

Apostrophes can be typed straight, and will show up straight when editing, but they will be published as curly.

§

Respond privately

I am no longer accepting public comments on this post, but you can use this form to contact me privately. (Your message will not be published.)



§

firehosecodeplanet

© 2001–9 Mark Pilgrim