feat(linky): allow optional 'target' argument

Closes #1443
This commit is contained in:
Zach Dexter
2012-10-09 14:04:58 -04:00
committed by Igor Minar
parent 55d15806fb
commit 610927d77b
2 changed files with 30 additions and 2 deletions

View File

@@ -24,4 +24,11 @@ describe('linky', function() {
expect(linky("send email to me@example.com, but")).
toEqual('send email to <a href="mailto:me@example.com">me@example.com</a>, but');
});
it('should handle target:', function() {
expect(linky("http://example.com", "_blank")).
toEqual('<a target="_blank" href="http://example.com">http://example.com</a>')
expect(linky("http://example.com", "someNamedIFrame")).
toEqual('<a target="someNamedIFrame" href="http://example.com">http://example.com</a>')
});
});