Source

mdx_smartypants / mdx_smartypants.py

Diff from to

mdx_smartypants.py

 
 from markdown.postprocessors import Postprocessor
 from markdown.extensions import Extension
-from smartypants import smartyPants
+import spants
+from spants import smartyPants   # local version of smartypants
 from namedentities import named_entities
 
 
 # of tags not delved into. This fix has been suggested to the smartypants
 # author and package maintainer. But until they update it, there's monkey
 # patching.
-import smartypants, re
+import re
 
-smartypants.tags_to_skip_regex = re.compile(r"<(/)?(pre|code|kbd|script|style|math)[^>]*>", re.I)
+spants.tags_to_skip_regex = re.compile(r"<(/)?(pre|code|kbd|script|style|math)[^>]*>", re.I)
 
 class SmartypantsPost(Postprocessor):