add tests

This commit is contained in:
j 2012-05-23 22:23:32 +02:00
parent aea2473399
commit 7138a8eaa0

View file

@ -2,8 +2,13 @@
/*@
Ox.parseEmailAddresses <f> Takes HTML and turns e-mail addresses into links
> Ox.parseEmailAddresses('test@pad.ma')
'<a href="mailto:test@pad.ma">test@pad.ma</a>'
> Ox.parseEmailAddresses('foo bar <foo@bar.com>')
'foo bar <<a href="mailto:foo@bar.com">foo@bar.com</a>>'
> Ox.parseEmailAddresses('foo bar <<a href="mailto:foo@bar.com">foo@bar.com</a>>')
'foo bar <<a href="mailto:foo@bar.com">foo@bar.com</a>>'
@*/
// fixme: no tests
// fixme: shouldn't this be formatEmailAddresses?
// fixme: fails for linked emails
Ox.parseEmailAddresses = function(html) {