3 module.exports = locate;
5 var PROTOCOLS = ['https://', 'http://', 'mailto:'];
7 function locate(value, fromIndex) {
8 var length = PROTOCOLS.length;
13 if (!this.options.gfm) {
17 while (++index < length) {
18 position = value.indexOf(PROTOCOLS[index], fromIndex);
20 if (position !== -1 && (position < min || min === -1)) {