Test strip and add space still works when extra_params is a callable

This commit is contained in:
Jason Choy 2012-05-08 10:24:46 +01:00
parent 4fd35b8c34
commit 783d76cbfc
1 changed files with 4 additions and 0 deletions

View File

@ -125,6 +125,10 @@ linkify_tests = [
("www.external-link.com and www.internal-link.com/blogs extra",
{"extra_params": lambda(href):'class="internal"' if href.startswith("http://www.internal-link.com") else 'rel="nofollow" class="external"'},
u'<a href="http://www.external-link.com" rel="nofollow" class="external">www.external-link.com</a> and <a href="http://www.internal-link.com/blogs" class="internal">www.internal-link.com/blogs</a> extra'),
("www.external-link.com",
{"extra_params": lambda(href):' rel="nofollow" class="external" '},
u'<a href="http://www.external-link.com" rel="nofollow" class="external">www.external-link.com</a>'),
]