Skip to content

Commit 9c98a5d

Browse files
committed
Build v3.16.0
1 parent 2a146ef commit 9c98a5d

32 files changed

+441
-301
lines changed

dist/Autolinker.js

Lines changed: 210 additions & 140 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/Autolinker.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/Autolinker.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/Autolinker.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/api/data-505cded3cc3fe2e167e66ecc8bed613f.js renamed to docs/api/data-3400bf0703ba4473aec3f5c1f59c0a3a.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/api/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<title>Autolinker v3.15.0 API Docs</title>
4+
<title>Autolinker v3.16.0 API Docs</title>
55
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
66
<meta http-equiv="X-UA-Compatible" content="chrome=1">
77
<meta name="fragment" content="!">
@@ -13,7 +13,7 @@
1313
<link rel="stylesheet" href="styles-3eba09980fa05ead185cb17d9c0deb0f.css" type="text/css" />
1414

1515
<script type="text/javascript" src="extjs/ext-all.js"></script>
16-
<script type="text/javascript" src="data-505cded3cc3fe2e167e66ecc8bed613f.js"></script>
16+
<script type="text/javascript" src="data-3400bf0703ba4473aec3f5c1f59c0a3a.js"></script>
1717

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

@@ -22,9 +22,9 @@
2222
</head>
2323
<body id="ext-body">
2424

25-
<div id="loading"><span class="title">Autolinker v3.15.0 API Docs</span><span class="logo"></span></div>
25+
<div id="loading"><span class="title">Autolinker v3.16.0 API Docs</span><span class="logo"></span></div>
2626

27-
<div id="header-content">Autolinker v3.15.0 API Docs</div>
27+
<div id="header-content">Autolinker v3.16.0 API Docs</div>
2828

2929
<div id='categories-content' style='display:none'>
3030
<div class='section'>
@@ -79,7 +79,7 @@ <h3>Others...</h3>
7979

8080

8181

82-
<div id='footer-content' style='display: none'>Generated on Mon 28 Feb 2022 17:38:03 by <a href='https://github.com/senchalabs/jsduck'>JSDuck</a> 5.3.4.</div>
82+
<div id='footer-content' style='display: none'>Generated on Wed 17 Aug 2022 12:39:55 by <a href='https://github.com/senchalabs/jsduck'>JSDuck</a> 5.3.4.</div>
8383

8484

8585

docs/api/output/global.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/api/source/Autolinker.html

Lines changed: 70 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,10 @@
269269
* `&#39;www.google.com&#39;` will be displayed as `&#39;google.com&#39;`. `false` to not
270270
* strip the `&#39;www&#39;`.
271271
*/
272-
this.stripPrefix = { scheme: true, www: true }; // default value just to get the above doc comment in the ES5 output and documentation generator
272+
this.stripPrefix = {
273+
scheme: true,
274+
www: true,
275+
}; // default value just to get the above doc comment in the ES5 output and documentation generator
273276
<span id='Autolinker-cfg-stripTrailingSlash'> /**
274277
</span> * @cfg {Boolean} [stripTrailingSlash=true]
275278
*
@@ -337,7 +340,10 @@
337340
* &#39;yahoo.com/some..to/a/file&#39;. For more details, see
338341
* {@link Autolinker.truncate.TruncateSmart}.
339342
*/
340-
this.truncate = { length: 0, location: &#39;end&#39; }; // default value just to get the above doc comment in the ES5 output and documentation generator
343+
this.truncate = {
344+
length: 0,
345+
location: &#39;end&#39;,
346+
}; // default value just to get the above doc comment in the ES5 output and documentation generator
341347
<span id='Autolinker-cfg-className'> /**
342348
</span> * @cfg {String} className
343349
*
@@ -423,17 +429,25 @@
423429
this.mention = cfg.mention || this.mention;
424430
this.newWindow = typeof cfg.newWindow === &#39;boolean&#39; ? cfg.newWindow : this.newWindow;
425431
this.stripPrefix = this.normalizeStripPrefixCfg(cfg.stripPrefix);
426-
this.stripTrailingSlash = typeof cfg.stripTrailingSlash === &#39;boolean&#39; ? cfg.stripTrailingSlash : this.stripTrailingSlash;
427-
this.decodePercentEncoding = typeof cfg.decodePercentEncoding === &#39;boolean&#39; ? cfg.decodePercentEncoding : this.decodePercentEncoding;
432+
this.stripTrailingSlash =
433+
typeof cfg.stripTrailingSlash === &#39;boolean&#39;
434+
? cfg.stripTrailingSlash
435+
: this.stripTrailingSlash;
436+
this.decodePercentEncoding =
437+
typeof cfg.decodePercentEncoding === &#39;boolean&#39;
438+
? cfg.decodePercentEncoding
439+
: this.decodePercentEncoding;
428440
this.sanitizeHtml = cfg.sanitizeHtml || false;
429441
// Validate the value of the `mention` cfg
430442
var mention = this.mention;
431-
if (mention !== false &amp;&amp; [&#39;twitter&#39;, &#39;instagram&#39;, &#39;soundcloud&#39;, &#39;tiktok&#39;].indexOf(mention) === -1) {
443+
if (mention !== false &amp;&amp;
444+
[&#39;twitter&#39;, &#39;instagram&#39;, &#39;soundcloud&#39;, &#39;tiktok&#39;].indexOf(mention) === -1) {
432445
throw new Error(&quot;invalid `mention` cfg &#39;&quot;.concat(mention, &quot;&#39; - see docs&quot;));
433446
}
434447
// Validate the value of the `hashtag` cfg
435448
var hashtag = this.hashtag;
436-
if (hashtag !== false &amp;&amp; [&#39;twitter&#39;, &#39;facebook&#39;, &#39;instagram&#39;, &#39;tiktok&#39;].indexOf(hashtag) === -1) {
449+
if (hashtag !== false &amp;&amp;
450+
[&#39;twitter&#39;, &#39;facebook&#39;, &#39;instagram&#39;, &#39;tiktok&#39;].indexOf(hashtag) === -1) {
437451
throw new Error(&quot;invalid `hashtag` cfg &#39;&quot;.concat(hashtag, &quot;&#39; - see docs&quot;));
438452
}
439453
this.truncate = this.normalizeTruncateCfg(cfg.truncate);
@@ -520,11 +534,12 @@
520534
if (typeof urls === &#39;boolean&#39;) {
521535
return { schemeMatches: urls, wwwMatches: urls, tldMatches: urls };
522536
}
523-
else { // object form
537+
else {
538+
// object form
524539
return {
525540
schemeMatches: typeof urls.schemeMatches === &#39;boolean&#39; ? urls.schemeMatches : true,
526541
wwwMatches: typeof urls.wwwMatches === &#39;boolean&#39; ? urls.wwwMatches : true,
527-
tldMatches: typeof urls.tldMatches === &#39;boolean&#39; ? urls.tldMatches : true
542+
tldMatches: typeof urls.tldMatches === &#39;boolean&#39; ? urls.tldMatches : true,
528543
};
529544
}
530545
};
@@ -544,10 +559,11 @@
544559
if (typeof stripPrefix === &#39;boolean&#39;) {
545560
return { scheme: stripPrefix, www: stripPrefix };
546561
}
547-
else { // object form
562+
else {
563+
// object form
548564
return {
549565
scheme: typeof stripPrefix.scheme === &#39;boolean&#39; ? stripPrefix.scheme : true,
550-
www: typeof stripPrefix.www === &#39;boolean&#39; ? stripPrefix.www : true
566+
www: typeof stripPrefix.www === &#39;boolean&#39; ? stripPrefix.www : true,
551567
};
552568
}
553569
};
@@ -565,10 +581,11 @@
565581
if (typeof truncate === &#39;number&#39;) {
566582
return { length: truncate, location: &#39;end&#39; };
567583
}
568-
else { // object, or undefined/null
584+
else {
585+
// object, or undefined/null
569586
return (0, utils_1.defaults)(truncate || {}, {
570587
length: Number.POSITIVE_INFINITY,
571-
location: &#39;end&#39;
588+
location: &#39;end&#39;,
572589
});
573590
}
574591
};
@@ -619,7 +636,7 @@
619636
// Only process text nodes that are not within an &lt;a&gt;, &lt;style&gt; or &lt;script&gt; tag
620637
if (skipTagsStackCount === 0) {
621638
// &quot;Walk around&quot; common HTML entities. An &#39;&amp;nbsp;&#39; (for example)
622-
// could be at the end of a URL, but we don&#39;t want to
639+
// could be at the end of a URL, but we don&#39;t want to
623640
// include the trailing &#39;&amp;&#39; in the URL. See issue #76
624641
// TODO: Handle HTML entities separately in parseHtml() and
625642
// don&#39;t emit them as &quot;text&quot; except for &amp;amp; entities
@@ -668,7 +685,9 @@
668685
*/
669686
Autolinker.prototype.compactMatches = function (matches) {
670687
// First, the matches need to be sorted in order of offset
671-
matches.sort(function (a, b) { return a.getOffset() - b.getOffset(); });
688+
matches.sort(function (a, b) {
689+
return a.getOffset() - b.getOffset();
690+
});
672691
var i = 0;
673692
while (i &lt; matches.length - 1) {
674693
var match = matches[i], offset = match.getOffset(), matchedTextLength = match.getMatchedText().length, endIdx = offset + matchedTextLength;
@@ -709,15 +728,25 @@
709728
*/
710729
Autolinker.prototype.removeUnwantedMatches = function (matches) {
711730
if (!this.hashtag)
712-
(0, utils_1.remove)(matches, function (match) { return match.getType() === &#39;hashtag&#39;; });
731+
(0, utils_1.remove)(matches, function (match) {
732+
return match.getType() === &#39;hashtag&#39;;
733+
});
713734
if (!this.email)
714-
(0, utils_1.remove)(matches, function (match) { return match.getType() === &#39;email&#39;; });
735+
(0, utils_1.remove)(matches, function (match) {
736+
return match.getType() === &#39;email&#39;;
737+
});
715738
if (!this.phone)
716-
(0, utils_1.remove)(matches, function (match) { return match.getType() === &#39;phone&#39;; });
739+
(0, utils_1.remove)(matches, function (match) {
740+
return match.getType() === &#39;phone&#39;;
741+
});
717742
if (!this.mention)
718-
(0, utils_1.remove)(matches, function (match) { return match.getType() === &#39;mention&#39;; });
743+
(0, utils_1.remove)(matches, function (match) {
744+
return match.getType() === &#39;mention&#39;;
745+
});
719746
if (!this.urls.schemeMatches) {
720-
(0, utils_1.remove)(matches, function (m) { return m.getType() === &#39;url&#39; &amp;&amp; m.getUrlMatchType() === &#39;scheme&#39;; });
747+
(0, utils_1.remove)(matches, function (m) {
748+
return m.getType() === &#39;url&#39; &amp;&amp; m.getUrlMatchType() === &#39;scheme&#39;;
749+
});
721750
}
722751
if (!this.urls.wwwMatches) {
723752
(0, utils_1.remove)(matches, function (m) { return m.getType() === &#39;url&#39; &amp;&amp; m.getUrlMatchType() === &#39;www&#39;; });
@@ -785,16 +814,14 @@
785814
*/
786815
Autolinker.prototype.link = function (textOrHtml) {
787816
if (!textOrHtml) {
788-
return &quot;&quot;;
817+
return &#39;&#39;;
789818
} // handle `null` and `undefined` (for JavaScript users that don&#39;t have TypeScript support)
790819
/* We would want to sanitize the start and end characters of a tag
791820
* before processing the string in order to avoid an XSS scenario.
792821
* This behaviour can be changed by toggling the sanitizeHtml option.
793822
*/
794823
if (this.sanitizeHtml) {
795-
textOrHtml = textOrHtml
796-
.replace(/&lt;/g, &#39;&amp;lt;&#39;)
797-
.replace(/&gt;/g, &#39;&amp;gt;&#39;);
824+
textOrHtml = textOrHtml.replace(/&lt;/g, &#39;&amp;lt;&#39;).replace(/&gt;/g, &#39;&amp;gt;&#39;);
798825
}
799826
var matches = this.parse(textOrHtml), newHtml = [], lastIndex = 0;
800827
for (var i = 0, len = matches.length; i &lt; len; i++) {
@@ -833,7 +860,8 @@
833860
else if (replaceFnResult instanceof html_tag_1.HtmlTag) {
834861
return replaceFnResult.toAnchorString();
835862
}
836-
else { // replaceFnResult === true, or no/unknown return value from function
863+
else {
864+
// replaceFnResult === true, or no/unknown return value from function
837865
// Perform Autolinker&#39;s default anchor tag generation
838866
var anchorTag = match.buildTag(); // returns an Autolinker.HtmlTag instance
839867
return anchorTag.toAnchorString();
@@ -850,11 +878,22 @@
850878
if (!this.matchers) {
851879
var tagBuilder = this.getTagBuilder();
852880
var matchers = [
853-
new hashtag_matcher_1.HashtagMatcher({ tagBuilder: tagBuilder, serviceName: this.hashtag }),
881+
new hashtag_matcher_1.HashtagMatcher({
882+
tagBuilder: tagBuilder,
883+
serviceName: this.hashtag,
884+
}),
854885
new email_matcher_1.EmailMatcher({ tagBuilder: tagBuilder }),
855886
new phone_matcher_1.PhoneMatcher({ tagBuilder: tagBuilder }),
856-
new mention_matcher_1.MentionMatcher({ tagBuilder: tagBuilder, serviceName: this.mention }),
857-
new url_matcher_1.UrlMatcher({ tagBuilder: tagBuilder, stripPrefix: this.stripPrefix, stripTrailingSlash: this.stripTrailingSlash, decodePercentEncoding: this.decodePercentEncoding })
887+
new mention_matcher_1.MentionMatcher({
888+
tagBuilder: tagBuilder,
889+
serviceName: this.mention,
890+
}),
891+
new url_matcher_1.UrlMatcher({
892+
tagBuilder: tagBuilder,
893+
stripPrefix: this.stripPrefix,
894+
stripTrailingSlash: this.stripTrailingSlash,
895+
decodePercentEncoding: this.decodePercentEncoding,
896+
}),
858897
];
859898
return (this.matchers = matchers);
860899
}
@@ -875,11 +914,12 @@
875914
tagBuilder = this.tagBuilder = new anchor_tag_builder_1.AnchorTagBuilder({
876915
newWindow: this.newWindow,
877916
truncate: this.truncate,
878-
className: this.className
917+
className: this.className,
879918
});
880919
}
881920
return tagBuilder;
882921
};
922+
// NOTE: must be &#39;export default&#39; here for UMD module
883923
<span id='Autolinker-static-property-version'> /**
884924
</span> * @static
885925
* @property {String} version
@@ -909,7 +949,7 @@
909949
Matcher: matcher_1.Matcher,
910950
Mention: mention_matcher_1.MentionMatcher,
911951
Phone: phone_matcher_1.PhoneMatcher,
912-
Url: url_matcher_1.UrlMatcher
952+
Url: url_matcher_1.UrlMatcher,
913953
};
914954
<span id='Autolinker-HtmlTag-property-match'> /**
915955
</span> * For backwards compatibility with Autolinker 1.x, the Match classes are
@@ -921,7 +961,7 @@
921961
Match: match_1.Match,
922962
Mention: mention_match_1.MentionMatch,
923963
Phone: phone_match_1.PhoneMatch,
924-
Url: url_match_1.UrlMatch
964+
Url: url_match_1.UrlMatch,
925965
};
926966
return Autolinker;
927967
}());

docs/api/source/anchor-tag-builder.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
return new html_tag_1.HtmlTag({
8787
tagName: &#39;a&#39;,
8888
attrs: this.createAttrs(match),
89-
innerHtml: this.processAnchorText(match.getAnchorText())
89+
innerHtml: this.processAnchorText(match.getAnchorText()),
9090
});
9191
};
9292
<span id='Autolinker-AnchorTagBuilder-method-createAttrs'> /**
@@ -100,15 +100,15 @@
100100
*/
101101
AnchorTagBuilder.prototype.createAttrs = function (match) {
102102
var attrs = {
103-
&#39;href&#39;: match.getAnchorHref() // we&#39;ll always have the `href` attribute
103+
href: match.getAnchorHref(), // we&#39;ll always have the `href` attribute
104104
};
105105
var cssClass = this.createCssClass(match);
106106
if (cssClass) {
107107
attrs[&#39;class&#39;] = cssClass;
108108
}
109109
if (this.newWindow) {
110-
attrs[&#39;target&#39;] = &quot;_blank&quot;;
111-
attrs[&#39;rel&#39;] = &quot;noopener noreferrer&quot;; // Issue #149. See https://mathiasbynens.github.io/rel-noopener/
110+
attrs[&#39;target&#39;] = &#39;_blank&#39;;
111+
attrs[&#39;rel&#39;] = &#39;noopener noreferrer&#39;; // Issue #149. See https://mathiasbynens.github.io/rel-noopener/
112112
}
113113
if (this.truncate) {
114114
if (this.truncate.length &amp;&amp; this.truncate.length &lt; match.getAnchorText().length) {
@@ -140,7 +140,7 @@
140140
AnchorTagBuilder.prototype.createCssClass = function (match) {
141141
var className = this.className;
142142
if (!className) {
143-
return &quot;&quot;;
143+
return &#39;&#39;;
144144
}
145145
else {
146146
var returnClasses = [className], cssClassSuffixes = match.getCssClassSuffixes();

0 commit comments

Comments
 (0)