Skip to content

Commit ed820a6

Browse files
Merge pull request #613 from Crozzers/fix-smarty-pants-runtime-check
Fix smarty pants extra not triggering when it should (#611)
2 parents 1032d35 + 7677802 commit ed820a6

File tree

5 files changed

+15
-1
lines changed

5 files changed

+15
-1
lines changed

CHANGES.md

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
- [pull #607] Fix `middle-word-em` extra preventing strongs from being recognized (#606)
77
- [pull #609] Add option to output to file in CLI (#608)
88
- [pull #612] Fix footnote labels appearing out-of-order (#536)
9+
- [pull #613] Fix smarty pants extra not triggering when it should (#611)
910

1011

1112
## python-markdown2 2.5.1

lib/markdown2.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -3321,7 +3321,13 @@ def run(self, text):
33213321
return text
33223322

33233323
def test(self, text):
3324-
return "'" in text or '"' in text
3324+
return any(i in text for i in (
3325+
"'",
3326+
'"',
3327+
'--',
3328+
'...',
3329+
'. . .'
3330+
))
33253331

33263332

33273333
class Strike(Extra):
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<p>ho ho &#8212; ho ho</p>
2+
3+
<p>ho &#8220;ho&#8221; &#8212; ho ho</p>
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"extras": ["smarty-pants"]}
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ho ho --- ho ho
2+
3+
ho "ho" --- ho ho

0 commit comments

Comments
 (0)