diff tools/mdx_urlize.py @ 658:2adf01661ac5

Need to update the Markdown urlize extension too. For reference, here is where I got it: https://github.com/r0wb0t/markdown-urlize
author Brian Neal <bgneal@gmail.com>
date Sat, 11 May 2013 16:21:55 -0500
parents f54bf3b3bece
children
line wrap: on
line diff
--- a/tools/mdx_urlize.py	Sat May 11 15:49:02 2013 -0500
+++ b/tools/mdx_urlize.py	Sat May 11 16:21:55 2013 -0500
@@ -1,7 +1,4 @@
-"""
-Taken from: https://github.com/r0wb0t/markdown-urlize
-
-A more liberal autolinker
+"""A more liberal autolinker
 
 Inspired by Django's urlize function.
 
@@ -64,9 +61,9 @@
             else:
                 url = 'http://' + url
     
-        el = markdown.etree.Element("a")
+        el = markdown.util.etree.Element("a")
         el.set('href', url)
-        el.text = markdown.AtomicString(text)
+        el.text = markdown.util.AtomicString(text)
         return el
 
 class UrlizeExtension(markdown.Extension):