Commit 2c35ea74 by benjaoming

urlize also on last-of-line urls + fix icon

parent 8fd557c4
......@@ -52,7 +52,7 @@ URLIZE_RE = (
r'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|' # ...or ipv4
r'\[?[A-F0-9]*:[A-F0-9:]+\]?)' # ...or ipv6
r'(?::\d+)?' # optional port
r'(?:/[^\s\[\(\]\)]*\s+)?)'
r'(?:/[^\s\[\(\]\)]*(?:\s+|$))?)'
)
class UrlizePattern(markdown.inlinepatterns.Pattern):
......@@ -78,7 +78,7 @@ class UrlizePattern(markdown.inlinepatterns.Pattern):
url = 'http://' + url
icon = markdown.util.etree.Element("span")
icon.set('class', 'icon-link-external')
icon.set('class', 'icon-external-link')
span_text = markdown.util.etree.Element("span")
span_text.text = markdown.util.AtomicString(" " + text)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment