aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--markdown/extensions/smarty.py4
-rw-r--r--tests/extensions/smarty.html1
-rw-r--r--tests/extensions/smarty.txt2
3 files changed, 5 insertions, 2 deletions
diff --git a/markdown/extensions/smarty.py b/markdown/extensions/smarty.py
index 6f15d2c..21f30a4 100644
--- a/markdown/extensions/smarty.py
+++ b/markdown/extensions/smarty.py
@@ -182,12 +182,12 @@ class SmartyExtension(Extension):
def extendMarkdown(self, md, md_globals):
configs = self.getConfigs()
self.inlinePatterns = OrderedDict()
+ if configs['smart_ellipses']:
+ self.educateEllipses(md)
if configs['smart_quotes']:
self.educateQuotes(md)
if configs['smart_dashes']:
self.educateDashes(md)
- if configs['smart_ellipses']:
- self.educateEllipses(md)
inlineProcessor = InlineProcessor(md)
inlineProcessor.inlinePatterns = self.inlinePatterns
md.treeprocessors.add('smarty', inlineProcessor, '_end')
diff --git a/tests/extensions/smarty.html b/tests/extensions/smarty.html
index 6b5e698..16aba6d 100644
--- a/tests/extensions/smarty.html
+++ b/tests/extensions/smarty.html
@@ -13,6 +13,7 @@ one two &lsquo;60s<br />
&lsquo;quoted&rsquo; text and <strong>bold &lsquo;quoted&rsquo; text</strong><br />
em-dashes (&mdash;) and ellipes (&hellip;)<br />
&ldquo;<a href="http://example.com">Link</a>&rdquo; &mdash; she said.</p>
+<p>&ldquo;Ellipsis within quotes&hellip;&rdquo;</p>
<hr />
<p>Escaped -- ndash<br />
'Escaped' "quotes"<br />
diff --git a/tests/extensions/smarty.txt b/tests/extensions/smarty.txt
index fbf4d03..00dc1a2 100644
--- a/tests/extensions/smarty.txt
+++ b/tests/extensions/smarty.txt
@@ -15,6 +15,8 @@ It's fun. What's fun?
em-dashes (---) and ellipes (...)
"[Link](http://example.com)" --- she said.
+"Ellipsis within quotes..."
+
--- -- ---
Escaped \-- ndash