fix for smartypants getting screwed up by formatting tags within a sentence.

This commit is contained in:
Lee 2012-05-23 02:08:11 +08:00
parent d82f376ccd
commit a1b7341d80

View File

@ -601,10 +601,6 @@ def educateQuotes(str):
# Special case for Quotes at end of line with a preceeding space (may change just to end of line) # Special case for Quotes at end of line with a preceeding space (may change just to end of line)
str = re.sub(r"""(?<=\s)"$""", r"""&#8221;""", str) str = re.sub(r"""(?<=\s)"$""", r"""&#8221;""", str)
str = re.sub(r"""(?<=\s)'$""", r"""&#8217;""", str) str = re.sub(r"""(?<=\s)'$""", r"""&#8217;""", str)
# Special case for Quotes at beginning of line with a space - multiparagraph quoted text:
str = re.sub(r"""^"(?=\s)""", r"""&#8220;""", str)
str = re.sub(r"""^'(?=\s)""", r"""&#8216;""", str)
# Special case for decade abbreviations (the '80s): # Special case for decade abbreviations (the '80s):
str = re.sub(r"""\b'(?=\d{2}s)""", r"""&#8217;""", str) str = re.sub(r"""\b'(?=\d{2}s)""", r"""&#8217;""", str)