Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #2 from posativ/master

markdown 2.1 compatibility
  • Loading branch information...
commit b1ffa0e6fe459e14bfa416344e7e277aee756c81 2 parents 4435e23 + 2638bd6
@favalex authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 mdx_asciimathml.py
View
7 mdx_asciimathml.py
@@ -36,7 +36,12 @@ def getCompiledRegExp(self):
return re.compile(r'^(.*)\$\$([^\$]*)\$\$(.*)$', re.M) # $$ a $$
def handleMatch(self, m):
- math = asciimathml.parse(m.group(2).strip(), markdown.etree.Element, markdown.AtomicString)
+ if markdown.version_info < (2, 1, 0):
+ math = asciimathml.parse(m.group(2).strip(), markdown.etree.Element,
+ markdown.AtomicString)
+ else:
+ math = asciimathml.parse(m.group(2).strip(),
+ markdown.util.etree.Element, markdown.util.AtomicString)
math.set('xmlns', 'http://www.w3.org/1998/Math/MathML')
return math
Please sign in to comment.
Something went wrong with that request. Please try again.