Skip to content

Commit 1f0c774

Browse files
author
Pierre-Louis Peeters
committed
Fix hashtag length to accept up to 139 characters
1 parent e732bb6 commit 1f0c774

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

dist/Autolinker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1709,7 +1709,7 @@ Autolinker.matchParser.MatchParser = Autolinker.Util.extend( Object, {
17091709
matcherRegex : (function() {
17101710
var twitterRegex = /(^|[^\w])@(\w{1,15})/, // For matching a twitter handle. Ex: @gregory_jacobs
17111711

1712-
hashtagRegex = /(^|[^\w])#(\w{1,15})/, // For matching a Hashtag. Ex: #games
1712+
hashtagRegex = /(^|[^\w])#(\w{1,139})/, // For matching a Hashtag. Ex: #games
17131713

17141714
emailRegex = /(?:[\-;:&=\+\$,\w\.]+@)/, // something@ for email addresses (a.k.a. local-part)
17151715
phoneRegex = /(?:\+?\d{1,3}[-\s.])?\(?\d{3}\)?[-\s.]?\d{3}[-\s.]\d{4}/, // ex: (123) 456-7890, 123 456 7890, 123-456-7890, etc.

0 commit comments

Comments
 (0)