Skip to content

Commit

Permalink
Merge pull request #2 from posativ/master
Browse files Browse the repository at this point in the history
markdown 2.1 compatibility
  • Loading branch information
favalex committed Apr 3, 2012
2 parents 4435e23 + 2638bd6 commit b1ffa0e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mdx_asciimathml.py
Expand Up @@ -36,7 +36,12 @@ def getCompiledRegExp(self):
return re.compile(r'^(.*)\$\$([^\$]*)\$\$(.*)$', re.M) # $$ a $$ return re.compile(r'^(.*)\$\$([^\$]*)\$\$(.*)$', re.M) # $$ a $$


def handleMatch(self, m): 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') math.set('xmlns', 'http://www.w3.org/1998/Math/MathML')
return math return math


Expand Down

0 comments on commit b1ffa0e

Please sign in to comment.