diff options
author | Martin Altmayer <altmayer@posteo.de> | 2014-08-11 20:04:49 +0200 |
---|---|---|
committer | Martin Altmayer <altmayer@posteo.de> | 2014-08-11 20:05:41 +0200 |
commit | 927ad008b51e5fa265b6e8497805ff09ec098d65 (patch) | |
tree | 73ec862bd033ba0d498b1112fb56d211b8f4920b | |
parent | af85029ca443609b803ebc83e806c1ee115db900 (diff) | |
download | markdown-927ad008b51e5fa265b6e8497805ff09ec098d65.tar.gz markdown-927ad008b51e5fa265b6e8497805ff09ec098d65.tar.bz2 markdown-927ad008b51e5fa265b6e8497805ff09ec098d65.zip |
Fixed an old typo in the smarty extension and added a test case.
-rw-r--r-- | markdown/extensions/smarty.py | 4 | ||||
-rw-r--r-- | tests/extensions/smarty.html | 3 | ||||
-rw-r--r-- | 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.: # <p>He said, "'Quoted' words in a larger quote."</p> 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 @@ -<p>1440–80’s<br /> +<p>’. +1440–80’s<br /> 1440–‘80s<br /> 1440—‘80s<br /> 1960s<br /> 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 |