Skip to content

Commit 4ade3df

Browse files
committed
Remove dist files from pull request
1 parent 23de9b8 commit 4ade3df

File tree

4 files changed

+50
-100
lines changed

4 files changed

+50
-100
lines changed

dist/Autolinker.js

Lines changed: 2 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1963,14 +1963,7 @@ Autolinker.matchParser.MatchParser = Autolinker.Util.extend( Object, {
19631963
if( this.matchHasUnbalancedClosingParen( matchStr ) ) {
19641964
matchStr = matchStr.substr( 0, matchStr.length - 1 ); // remove the trailing ")"
19651965
suffixStr = ")"; // this will be added after the generated <a> tag
1966-
} else {
1967-
// Handle an invalid character after the TLD
1968-
var pos = this.matchHasInvalidCharAfterTld( urlMatch, protocolUrlMatch );
1969-
if( pos > -1 ) {
1970-
suffixStr = matchStr.substr(pos); // this will be added after the generated <a> tag
1971-
matchStr = matchStr.substr( 0, pos ); // remove the trailing invalid chars
1972-
}
1973-
}
1966+
}
19741967

19751968
if( emailAddressMatch ) {
19761969
match = new Autolinker.match.Email( { matchedText: matchStr, email: emailAddressMatch } );
@@ -2065,52 +2058,9 @@ Autolinker.matchParser.MatchParser = Autolinker.Util.extend( Object, {
20652058
}
20662059

20672060
return false;
2068-
},
2069-
2070-
2071-
/**
2072-
* Determine if there's an invalid character after the TLD in a URL. Valid
2073-
* characters after TLD are ':/?#'. Exclude protocol matched URLs from this
2074-
* check.
2075-
*
2076-
* @private
2077-
* @param {String} urlMatch The matched URL, if there was one. Will be an
2078-
* empty string if the match is not a URL match.
2079-
* @param {String} protocolUrlMatch The match URL string for a protocol
2080-
* match. Ex: 'http://yahoo.com'. This is used to match something like
2081-
* 'http://localhost', where we won't double check that the domain name
2082-
* has at least one '.' in it.
2083-
* @return {Number} the position where the invalid character was found. If
2084-
* no such character was found, returns -1
2085-
*/
2086-
matchHasInvalidCharAfterTld : function( urlMatch, protocolUrlMatch ) {
2087-
if ( !urlMatch ) {
2088-
return -1;
2089-
}
2090-
2091-
var offset = 0;
2092-
if ( protocolUrlMatch ) {
2093-
offset = urlMatch.indexOf(':');
2094-
urlMatch = urlMatch.slice(offset);
2095-
}
2096-
2097-
var re = /^((.?\/\/)?[A-Za-z0-9\.\-]*[A-Za-z0-9\-]\.[A-Za-z]+)/;
2098-
var res = re.exec( urlMatch );
2099-
if ( res === null ) {
2100-
return -1;
2101-
}
2102-
2103-
offset += res[1].length;
2104-
urlMatch = urlMatch.slice(res[1].length);
2105-
if (/^[^.A-Za-z:\/?#]/.test(urlMatch)) {
2106-
return offset;
2107-
}
2108-
2109-
return -1;
2110-
}
2061+
}
21112062

21122063
} );
2113-
21142064
/*global Autolinker */
21152065
/*jshint scripturl:true */
21162066
/**

0 commit comments

Comments
 (0)