Skip to content

Commit 35a6561

Browse files
committed
Prevent middle-word-em from running if MWE's allowed.
No point doing anything to the text if MWE's allowed. The extra's only purpose is to protect MWE's
1 parent 2b9deb7 commit 35a6561

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/markdown2.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3160,6 +3160,10 @@ def __init__(self, md: Markdown, options: Union[dict, bool]):
31603160
, re.S | re.X)
31613161

31623162
def run(self, text):
3163+
if self.options['allowed']:
3164+
# if middle word em is allowed, do nothing. This extra's only use is to prevent them
3165+
return text
3166+
31633167
# run strong and whatnot first
31643168
# this also will process all strict ems
31653169
text = super().run(text)

0 commit comments

Comments
 (0)