Skip to content

Commit ed09b76

Browse files
committed
Add an additional test for checking multiple dots in a url match
1 parent ad6ea62 commit ed09b76

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/AutolinkerSpec.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,11 @@ describe( "Autolinker", function() {
295295
expect( result ).toBe( 'Joe went to <a href="https://ru.wikipedia.org/wiki/Кириллица?Кириллица=1#Кириллица">ru.wikipedia.org/wiki/Кириллица?Кириллица=1#Кириллица</a>' );
296296
} );
297297

298+
it( 'should not match an address with multiple dots', function() {
299+
expect( autolinker.link( 'hello:...world' ) ).toBe( 'hello:...world' );
300+
expect( autolinker.link( 'hello:wo.....rld' ) ).toBe( 'hello:wo.....rld' );
301+
});
302+
298303
describe( "protocol linking", function() {
299304

300305
it( "should NOT include preceding ':' introductions without a space", function() {

0 commit comments

Comments
 (0)