From 927ad008b51e5fa265b6e8497805ff09ec098d65 Mon Sep 17 00:00:00 2001 From: Martin Altmayer Date: Mon, 11 Aug 2014 20:04:49 +0200 Subject: Fixed an old typo in the smarty extension and added a test case. --- markdown/extensions/smarty.py | 4 ++-- tests/extensions/smarty.html | 3 ++- tests/extensions/smarty.txt | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/markdown/extensions/smarty.py b/markdown/extensions/smarty.py index cc6b694..ca9edd2 100644 --- a/markdown/extensions/smarty.py +++ b/markdown/extensions/smarty.py @@ -102,8 +102,8 @@ substitutions = { # Special case if the very first character is a quote # followed by punctuation at a non-word-break. Close the quotes by brute force: -singleQuoteStartRe = r"^'(?=%s\\B)" % punctClass -doubleQuoteStartRe = r'^"(?=%s\\B)' % punctClass +singleQuoteStartRe = r"^'(?=%s\B)" % punctClass +doubleQuoteStartRe = r'^"(?=%s\B)' % punctClass # Special case for double sets of quotes, e.g.: #

He said, "'Quoted' words in a larger quote."

diff --git a/tests/extensions/smarty.html b/tests/extensions/smarty.html index c0459d9..0907a73 100644 --- a/tests/extensions/smarty.html +++ b/tests/extensions/smarty.html @@ -1,4 +1,5 @@ -

1440–80’s
+

’. +1440–80’s
1440–‘80s
1440—‘80s
1960s
diff --git a/tests/extensions/smarty.txt b/tests/extensions/smarty.txt index 1cee803..3b034cf 100644 --- a/tests/extensions/smarty.txt +++ b/tests/extensions/smarty.txt @@ -1,3 +1,4 @@ +'. 1440--80's 1440--'80s 1440---'80s -- cgit v1.2.3