From 5159eb76350a4da587bab3d73e212ed134cde789 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Tue, 2 Nov 2010 18:39:30 -0700 Subject: fix the linky filter --- test/FiltersSpec.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'test/FiltersSpec.js') diff --git a/test/FiltersSpec.js b/test/FiltersSpec.js index 4dd108ac..0de7b5b7 100644 --- a/test/FiltersSpec.js +++ b/test/FiltersSpec.js @@ -74,8 +74,8 @@ describe('filter', function(){ }); describe('Linky', function() { + var linky = filter.linky; it('should do basic filter', function(){ - var linky = filter.linky; assertEquals( 'http://ab/ ' + '(http://a/) ' + @@ -84,6 +84,13 @@ describe('filter', function(){ linky("http://ab/ (http://a/) http://1.2/v:~-123. c").html); assertEquals(undefined, linky(undefined)); }); + + it('should handle mailto:', function(){ + expect(linky("mailto:me@example.com").html).toEqual('me@example.com'); + expect(linky("me@example.com").html).toEqual('me@example.com'); + expect(linky("send email to me@example.com, but").html). + toEqual('send email to me@example.com, but'); + }); }); describe('date', function(){ -- cgit v1.2.3