Make bare URL RegExp case-insensitive, add more tests.

This commit is contained in:
David Anson 2017-11-02 22:36:53 -07:00
parent 4a27c3d100
commit 6fa609fdbd
2 changed files with 5 additions and 1 deletions

View file

@ -6,7 +6,7 @@ var shared = require("./shared");
var atxClosedHeaderNoSpaceRe = /(?:^#+\S)|(?:\S#+\s*$)/;
var atxClosedHeaderSpaceRe = /(?:^#+\s\s+?\S)|(?:\S\s\s+?#+\s*$)/;
var atxHeaderSpaceRe = /^#+\s*\S/;
var bareUrlRe = /(?:http|ftp)s?:\/\/[^\s]*/;
var bareUrlRe = /(?:http|ftp)s?:\/\/[^\s]*/i;
var dollarCommandRe = /^(\s*)(\$\s)/;
var emptyLinkRe = /\[[^\]]*](?:\((?:#?|(?:<>))\))|(?:\[[^\]]*])/;
var htmlRe = /<[^>]*>/;

View file

@ -6,4 +6,8 @@ which will tell you all you want to know.
http://www.google.com/ {MD034}
hTtPs://gOoGlE.cOm/ {MD034}
ftp://user:password@ftp-server.example.com/dir/file.txt {MD034}
This link should be fine: <http://www.google.com/>