aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Shachnev <mitya57@gmail.com>2014-03-11 12:39:28 +0400
committerDmitry Shachnev <mitya57@gmail.com>2014-03-11 20:49:17 +0400
commit5db95251ad52b39fe85b5fc345815306704c451f (patch)
treeb042b5adb9b81f7c7919db201c5fa8015f2bf99a
parent20911bfd67183aa59889e8fbf1635a54016cd171 (diff)
downloadmarkdown-5db95251ad52b39fe85b5fc345815306704c451f.tar.gz
markdown-5db95251ad52b39fe85b5fc345815306704c451f.tar.bz2
markdown-5db95251ad52b39fe85b5fc345815306704c451f.zip
smarty: Pass tuples, not iterable strings to the pattern.
-rw-r--r--markdown/extensions/smarty.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/markdown/extensions/smarty.py b/markdown/extensions/smarty.py
index f452afc..0557a54 100644
--- a/markdown/extensions/smarty.py
+++ b/markdown/extensions/smarty.py
@@ -150,14 +150,14 @@ class SmartyExtension(Extension):
md.inlinePatterns.add(name, pattern, after)
def educateDashes(self, md):
- emDashesPattern = SubstituteTextPattern(r'(?<!-)---(?!-)', '&mdash;', md)
- enDashesPattern = SubstituteTextPattern(r'(?<!-)--(?!-)', '&ndash;', md)
+ emDashesPattern = SubstituteTextPattern(r'(?<!-)---(?!-)', ('&mdash;',), md)
+ enDashesPattern = SubstituteTextPattern(r'(?<!-)--(?!-)', ('&ndash;',), 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}(?!\.)', '&hellip;', md)
+ ellipsesPattern = SubstituteTextPattern(r'(?<!\.)\.{3}(?!\.)', ('&hellip;',), md)
md.inlinePatterns.add('smarty-ellipses', ellipsesPattern, '>entity')
def educateQuotes(self, md):