« Express Yourself In 10 Easy Steps | Main | Instant Karma's Gonna Get You »

Getting Ems And Ens To Work In Smarty Pants

This one's painfully obvious when you think about it. Unfortunately I had get the author to explain it to me.

The default behavior of Daring Fireball's excellent plug-in Smarty Pants is called mode "1". In this mode you can get an Em-dash ( --- ) by typing two dashes next to each other ( -- ). You cannot get an En-dash at all. You need to run Smarty Pants in mode "2" to have both active. Then you get an Em-dash ( --- ) with three dashes next to each other ( --- ) and an En-dash ( -- ) with two ( -- ). Here's the extra little (non-) tricky bit that I wasn't picking up on:

If you run Markdown and Smarty Pants together by using the pull-down menu in your Movable Type entry page, then you don't need to make any changes to your templates but Smarty Pants only works in mode "1" the default behavior. If you want to run it in mode "2", you need to add smarty_pants="2" to any MT tag where you want it to kick in and you need to set the pull-down menu to Markdown only. It's the "and" part that I missed.

Now it's all running great for me. I just have to go back and update my entries. For those of you who don't know what the whole deal is with the Em-dash and En-dash, this is a great resource.

Thanks John for helping me out with this.