diff options
-rw-r--r-- | markdown/extensions/smarty.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/markdown/extensions/smarty.py b/markdown/extensions/smarty.py index f452afc..2f946f8 100644 --- a/markdown/extensions/smarty.py +++ b/markdown/extensions/smarty.py @@ -73,7 +73,7 @@ from ..util import parseBoolValue # Constants for quote education. punctClass = r"""[!"#\$\%'()*+,-.\/:;<=>?\@\[\\\]\^_`{|}~]""" endOfWordClass = r"[\s.,;:!?)]" -closeClass = r"[^\ \t\r\n\[\{\(\-\u0002\u0003]" +closeClass = "[^\ \t\r\n\[\{\(\-\u0002\u0003]" openingQuotesBase = ( '(\s' # a whitespace char @@ -150,14 +150,14 @@ class SmartyExtension(Extension): md.inlinePatterns.add(name, pattern, after) def educateDashes(self, md): - emDashesPattern = SubstituteTextPattern(r'(?<!-)---(?!-)', '—', md) - enDashesPattern = SubstituteTextPattern(r'(?<!-)--(?!-)', '–', md) + emDashesPattern = SubstituteTextPattern(r'(?<!-)---(?!-)', ('—',), md) + enDashesPattern = SubstituteTextPattern(r'(?<!-)--(?!-)', ('–',), md) md.inlinePatterns.add('smarty-em-dashes', emDashesPattern, '>entity') md.inlinePatterns.add('smarty-en-dashes', enDashesPattern, '>smarty-em-dashes') def educateEllipses(self, md): - ellipsesPattern = SubstituteTextPattern(r'(?<!\.)\.{3}(?!\.)', '…', md) + ellipsesPattern = SubstituteTextPattern(r'(?<!\.)\.{3}(?!\.)', ('…',), md) md.inlinePatterns.add('smarty-ellipses', ellipsesPattern, '>entity') def educateQuotes(self, md): |