diff options
author | Yu-Jie Lin <livibetter@gmail.com> | 2013-08-12 10:22:01 +0800 |
---|---|---|
committer | Yu-Jie Lin <livibetter@gmail.com> | 2013-08-12 10:22:01 +0800 |
commit | 9cbb19a3e9cba68b474221ea575f9bd410548be5 (patch) | |
tree | f9f1bc4c818e8bc6e26c84f8e09976788051c29b /smartypants.py | |
parent | 736735b1bcf7c76d1aa9c129d1268841686dd079 (diff) | |
download | smartypants-9cbb19a3e9cba68b474221ea575f9bd410548be5.tar.gz |
fix convert_quote, it was also turned on since False != "0"
Diffstat (limited to 'smartypants.py')
-rwxr-xr-x | smartypants.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/smartypants.py b/smartypants.py index d4f51b6..a705d9b 100755 --- a/smartypants.py +++ b/smartypants.py @@ -57,7 +57,7 @@ def cb_story(args): def smartyPants(text, attr=default_smartypants_attr): # should we translate " entities into normal quotes? - convert_quot = False + convert_quot = 0 # Parse attributes: # 0 : do nothing @@ -122,7 +122,7 @@ def smartyPants(text, attr=default_smartypants_attr): elif c == "e": do_ellipses = 1 elif c == "w": - convert_quot = "1" + convert_quot = 1 else: pass # ignore unknown option @@ -167,7 +167,7 @@ def smartyPants(text, attr=default_smartypants_attr): if not in_pre: t = processEscapes(t) - if convert_quot != "0": + if convert_quot: t = re.sub('"', '"', t) if do_dashes: |