def _do_smart_punctuation(self, text):
if "<STR_LIT:'>" in text: <EOL><INDENT>text = self._do_smart_contractions(text)<EOL>text = self._opening_single_quote_re.sub("<STR_LIT>", text)<EOL>text = self._closing_single_quote_re.sub("<STR_LIT>", text)<EOL><DEDENT>if '<STR_LIT:">' in text: <EOL><INDENT>text = self._opening_double_quote_re.sub("<STR_LIT>", text)<EOL>text = self._closing_double_quote_re.sub("<STR_LIT>", text)<EOL><DEDENT>text = text.replace("<STR_LIT>", "<STR_LIT>")<EOL>text = text.replace("<STR_LIT>", "<STR_LIT>")<EOL>text = text.replace("<STR_LIT>", "<STR_LIT>")<EOL>text = text.replace("<STR_LIT>", "<STR_LIT>")<EOL>text = text.replace("<STR_LIT>", "<STR_LIT>")<EOL>return text<EOL>
Fancifies 'single quotes', "double quotes", and apostrophes.
        Converts --, ---, and ... into en dashes, em dashes, and ellipses.

        Inspiration is: <http://daringfireball.net/projects/smartypants/>
        See "test/tm-cases/smarty_pants.text" for a full discussion of the
        support here and
        <http://code.google.com/p/python-markdown2/issues/detail?id=42> for a
        discussion of some diversion from the original SmartyPants.