Skip to content

Commit b257809

Browse files
committed
add support for soundcloud mentions
1 parent 03bb04c commit b257809

File tree

6 files changed

+8058
-6
lines changed

6 files changed

+8058
-6
lines changed

dist/Autolinker.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ var Autolinker = function( cfg ) {
143143

144144
// Validate the value of the `mention` cfg
145145
var mention = this.mention;
146-
if( mention !== false && mention !== 'twitter' && mention !== 'instagram' ) {
146+
if( mention !== false && mention !== 'twitter' && mention !== 'instagram' && mention !== 'soundcloud' ) {
147147
throw new Error( "invalid `mention` cfg - see docs" );
148148
}
149149

@@ -3479,7 +3479,8 @@ Autolinker.matcher.Mention = Autolinker.Util.extend( Autolinker.matcher.Matcher,
34793479
*/
34803480
matcherRegexes : {
34813481
"twitter": new RegExp( '@[_' + Autolinker.RegexLib.alphaNumericCharsStr + ']{1,20}', 'g' ),
3482-
"instagram": new RegExp( '@[_.' + Autolinker.RegexLib.alphaNumericCharsStr + ']{1,50}', 'g' )
3482+
"instagram": new RegExp( '@[_.' + Autolinker.RegexLib.alphaNumericCharsStr + ']{1,50}', 'g' ),
3483+
"soundcloud": new RegExp( '@[_.' + Autolinker.RegexLib.alphaNumericCharsStr + "\-" + ']{1,50}', 'g' )
34833484
},
34843485

34853486
/**

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.

0 commit comments

Comments
 (0)