--- typogrify.module.ORIG 2009-03-21 10:04:08.000000000 -0400 +++ typogrify.module 2009-03-21 21:46:22.000000000 -0400 @@ -104,7 +104,7 @@ function _typogrify_process($text, $form // Smartypants formatting. if (variable_get("marksmarty_is_smarty_on_$format", 1) == 1) { global $smartypants_attr; - $smartypants_attr = variable_get("marksmarty_smarty_hyphens_$format", 0) + 1; + $smartypants_attr = variable_get("marksmarty_smarty_hyphens_$format", 0); $text = SmartyPants($text); } @@ -178,14 +178,27 @@ function _typogrify_settings($format) { '#default_value' => variable_get("marksmarty_is_smarty_on_$format", 1), ); + /* + * SmartyPant's em/en-dash parse attribute values: + * 0 : do nothing + * 1 : set all + * 2 : set all, using old school en- and em- dash shortcuts + * 3 : set all, using inverted old school en and em- dash shortcuts + */ + // Smartypants hyphenation settings. $form['typogrify_settings']["marksmarty_smarty_hyphens_$format"] = array( '#type' => 'select', '#title' => t('Hyphenation settings for SmartyPants'), '#default_value' => variable_get("marksmarty_smarty_hyphens_$format", 0), - '#options' => array(0 => t('"--" for em-dashes; no en-dash support'), 1 => t('"---" for em-dashes; "--" for en-dashes'), 2 => t('"--" for em-dashes; "---" for en-dashes')), + '#options' => array( + 1 => t('"--" for em-dashes; no en-dash support'), + 3 => t('"--" for em-dashes; "---" for en-dashes'), + 2 => t('"---" for em-dashes; "--" for en-dashes'), + ), ); } + // Wrap ampersand settings. $form['typogrify_settings']["typogrify_is_amp_on_$format"] = array( '#type' => 'checkbox',