File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,19 @@ describe( "Autolinker Url Matching -", () => {
9090 let result = autolinker . link ( 'http://10.0.0.108:9000/' ) ;
9191 expect ( result ) . toBe ( '<a href="http://10.0.0.108:9000/">10.0.0.108:9000</a>' ) ;
9292 } ) ;
93-
93+
94+
95+ it ( 'should link URLs with IP addresses but exclude trailing periods' , function ( ) {
96+ let result = autolinker . link ( 'Joe went to http://66.102.7.147.' ) ;
97+ expect ( result ) . toBe ( 'Joe went to <a href="http://66.102.7.147">66.102.7.147</a>.' ) ;
98+ } ) ;
99+
100+
101+ it ( 'should link protocol URLs that are only numbers' , function ( ) {
102+ let result = autolinker . link ( 'Joe went to bugtracker://20012909' ) ;
103+ expect ( result ) . toBe ( 'Joe went to <a href="bugtracker://20012909">bugtracker://20012909</a>' ) ;
104+ } ) ;
105+
94106
95107 it ( "should automatically link capitalized URLs" , function ( ) {
96108 let result = autolinker . link ( "Joe went to HTTP://WWW.YAHOO.COM" ) ;
You can’t perform that action at this time.
0 commit comments