[a-z0-9_._]+[a-z]))', re.I),
]
@@ -527,7 +527,7 @@
host that matches one of the regular expressions in avoid_hosts
(default localhost and 127.0.0.1).
- If you pass in an element, the elements tail will not be
+ If you pass in an element, the element's tail will not be
substituted, only the contents of the element.
"""
if el.tag in avoid_elements:
Modified: lxml/trunk/src/lxml/html/tests/test_autolink.txt
==============================================================================
--- lxml/trunk/src/lxml/html/tests/test_autolink.txt (original)
+++ lxml/trunk/src/lxml/html/tests/test_autolink.txt Thu Oct 30 17:59:51 2008
@@ -23,6 +23,17 @@
... Link: (http://foobar.com)
'''))
+Parenthesis are tricky, we'll do our best::
+
+ >>> print autolink_html('''
+ ... (Link: http://en.wikipedia.org/wiki/PC_Tools_(Central_Point_Software))
+ ... ''')
+
+ >>> print autolink_html('''
+ ... ... a link: http://foo.com)
+ ... ''')
+
+
Some cases that won't be caught (on purpose)::
>>> print(autolink_html('''