Skip to content

Commit

Permalink
Build 1.4.4 + doc
Browse files Browse the repository at this point in the history
  • Loading branch information
olafleur committed Sep 12, 2017
1 parent 3c47de6 commit 355143d
Show file tree
Hide file tree
Showing 17 changed files with 76 additions and 34 deletions.
24 changes: 19 additions & 5 deletions dist/Autolinker.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* Autolinker.js
* 1.4.3
* 1.4.4
*
* Copyright(c) 2017 Gregory Jacobs <greg@greg-jacobs.com>
* MIT License
Expand Down Expand Up @@ -240,7 +240,7 @@ Autolinker.parse = function( textOrHtml, options ) {
*
* Ex: 0.25.1
*/
Autolinker.version = '1.4.3';
Autolinker.version = '1.4.4';


Autolinker.prototype = {
Expand Down Expand Up @@ -1546,9 +1546,14 @@ Autolinker.RegexLib = (function() {
// See documentation below
var alphaNumericCharsStr = alphaCharsStr + decimalNumbersStr;

// Simplified IP regular expression
var ipRegex = new RegExp( '(?:[' + decimalNumbersStr + ']{1,3}\\.){3}[' + decimalNumbersStr + ']{1,3}' );

// Protected domain label which do not allow "-" character on the beginning and the end of a single label
var domainLabelStr = '[' + alphaNumericCharsStr + '](?:[' + alphaNumericCharsStr + '\\-]*[' + alphaNumericCharsStr + '])?';

// See documentation below
var domainNameRegex = new RegExp( '[' + alphaNumericCharsStr + '.\\-]*[' + alphaNumericCharsStr + '\\-]' );
var domainNameRegex = new RegExp( '(?:(?:(?:' + domainLabelStr + '\\.)*(?:' + domainLabelStr + '))|(?:' + ipRegex.source + '))' );

return {

Expand Down Expand Up @@ -3206,7 +3211,11 @@ Autolinker.matcher.Email = Autolinker.Util.extend( Autolinker.matcher.Matcher, {
*/
matcherRegex : (function() {
var alphaNumericChars = Autolinker.RegexLib.alphaNumericCharsStr,
emailRegex = new RegExp( '[' + alphaNumericChars + '\\-_\';:&=+$.,]+@' ), // something@ for email addresses (a.k.a. local-part)
specialCharacters = '!#$%&\'*+\\-\\/=?^_`{|}~',
restrictedSpecialCharacters = '\\s"(),:;<>@\\[\\]',
validCharacters = alphaNumericChars + specialCharacters,
validRestrictedCharacters = validCharacters + restrictedSpecialCharacters,
emailRegex = new RegExp( '(?:(?:[' + validCharacters + '](?![^@]*\\.\\.)(?:[' + validCharacters + '.]*[' + validCharacters + '])?)|(?:\\"[' + validRestrictedCharacters + '.]+\\"))@'),
domainNameRegex = Autolinker.RegexLib.domainNameRegex,
tldRegex = Autolinker.tldRegex; // match our known top level domains (TLDs)

Expand Down Expand Up @@ -3373,7 +3382,7 @@ Autolinker.matcher.Phone = Autolinker.Util.extend( Autolinker.matcher.Matcher, {
var matchedText = match[0],
cleanNumber = matchedText.replace(/[^0-9,;#]/g, ''), // strip out non-digit characters exclude comma semicolon and #
plusSign = !!match[1]; // match[ 1 ] is the prefixed plus sign, if there is one
if (/\D/.test(match[2]) && /\D/.test(matchedText)) {
if (this.testMatch(match[2]) && this.testMatch(matchedText)) {
matches.push(new Autolinker.match.Phone({
tagBuilder: tagBuilder,
matchedText: matchedText,
Expand All @@ -3385,9 +3394,14 @@ Autolinker.matcher.Phone = Autolinker.Util.extend( Autolinker.matcher.Matcher, {
}

return matches;
},

testMatch: function(text) {
return /\D/.test(text);
}

} );

/*global Autolinker */
/**
* @class Autolinker.matcher.Mention
Expand Down
6 changes: 3 additions & 3 deletions dist/Autolinker.min.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions docs/api/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>Autolinker v1.4.3 API Docs</title>
<title>Autolinker v1.4.4 API Docs</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="fragment" content="!">
Expand All @@ -10,10 +10,10 @@

<link rel="shortcut icon" type="image/ico" href="favicon.ico" />
<link rel="stylesheet" href="resources/css/app-4689d2a5522dcd3c9e9923ca59c33f27.css" type="text/css" />
<link rel="stylesheet" href="styles-3eba09980fa05ead185cb17d9c0deb0f.css" type="text/css" />
<link rel="stylesheet" href="styles-8184dad50dadb76aad743829a7c19ed0.css" type="text/css" />

<script type="text/javascript" src="extjs/ext-all.js"></script>
<script type="text/javascript" src="data-1df28a367878e4e8fc26f668c464fdb1.js"></script>
<script type="text/javascript" src="data-b1cba292aac630ea4a3da8e7d4445f33.js"></script>

<script type="text/javascript" src="app-0c945a27f43452df695771ddb60b3d14.js"></script>

Expand All @@ -22,9 +22,9 @@
</head>
<body id="ext-body">

<div id="loading"><span class="title">Autolinker v1.4.3 API Docs</span><span class="logo"></span></div>
<div id="loading"><span class="title">Autolinker v1.4.4 API Docs</span><span class="logo"></span></div>

<div id="header-content">Autolinker v1.4.3 API Docs</div>
<div id="header-content">Autolinker v1.4.4 API Docs</div>

<div id='categories-content' style='display:none'>
<div class='section'>
Expand Down Expand Up @@ -82,7 +82,7 @@ <h3>Others...</h3>



<div id='footer-content' style='display: none'>Generated on Thu 06 Apr 2017 08:29:16 by <a href='https://github.com/senchalabs/jsduck'>JSDuck</a> 5.3.4.</div>
<div id='footer-content' style='display: none'>Generated on Tue 12 Sep 2017 09:46:17 by <a href='https://github.com/senchalabs/jsduck'>JSDuck</a> 5.3.4.</div>



Expand Down
2 changes: 1 addition & 1 deletion docs/api/output/Autolinker.matcher.Email.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 355143d

Please sign in to comment.