From cc322c34b3b9d31f3c76c2d43a18983a84e67259 Mon Sep 17 00:00:00 2001 From: Heston Liebowitz Date: Wed, 13 Mar 2013 12:13:01 -0700 Subject: [PATCH 1/2] Fix imports for markdown.util, per http://pythonhosted.org/Markdown/release-2.1.0.html --- superscript.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/superscript.py b/superscript.py index 71eed4e..0792583 100644 --- a/superscript.py +++ b/superscript.py @@ -26,6 +26,7 @@ """ import markdown +import markdown.util # Global Vars SUPERSCRIPT_RE = r'(\^)([^\^]*)\2' # the number is a superscript^2^ @@ -34,11 +35,11 @@ class SuperscriptPattern(markdown.inlinepatterns.Pattern): """ Return a superscript Element (`word^2^`). """ def handleMatch(self, m): supr = m.group(3) - + text = supr - - el = markdown.etree.Element("sup") - el.text = markdown.AtomicString(text) + + el = markdown.util.etree.Element("sup") + el.text = mmarkdown.util.AtomicString(text) return el class SuperscriptExtension(markdown.Extension): From bc6d9ecc7cff6b889f3224a15abb9aad6c7105b5 Mon Sep 17 00:00:00 2001 From: Heston Liebowitz Date: Tue, 12 Aug 2014 11:14:52 -0700 Subject: [PATCH 2/2] Fixed typo. --- superscript.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superscript.py b/superscript.py index 0792583..e2fa963 100644 --- a/superscript.py +++ b/superscript.py @@ -39,7 +39,7 @@ def handleMatch(self, m): text = supr el = markdown.util.etree.Element("sup") - el.text = mmarkdown.util.AtomicString(text) + el.text = markdown.util.AtomicString(text) return el class SuperscriptExtension(markdown.Extension):