Skip to content

Commit a98c495

Browse files
committed
Update capturing group comments in MatchParser.js
1 parent b5d8e50 commit a98c495

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/matchParser/MatchParser.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,16 +163,17 @@ Autolinker.matchParser.MatchParser = Autolinker.Util.extend( Object, {
163163
'|',
164164

165165
// this setup does not scale well for open extension :( Need to rethink design of autolinker...
166-
// *** Capturing group $9, which matches a (USA for now) phone number
166+
// *** Capturing group $9, which matches a (USA for now) phone number, and
167+
// *** Capturing group $10, which matches the '+' sign for international numbers, if it exists
167168
'(',
168169
phoneRegex.source,
169170
')',
170171

171172
'|',
172173

173-
'(', // *** Capturing group $10, which can be used to check for a Hashtag match. Use group $12 for the actual Hashtag though. $11 may be used to reconstruct the original string in a replace()
174-
// *** Capturing group $11, which matches the whitespace character before the '#' sign (needed because of no lookbehinds), and
175-
// *** Capturing group $12, which matches the actual Hashtag
174+
'(', // *** Capturing group $11, which can be used to check for a Hashtag match. Use group $12 for the actual Hashtag though. $11 may be used to reconstruct the original string in a replace()
175+
// *** Capturing group $12, which matches the whitespace character before the '#' sign (needed because of no lookbehinds), and
176+
// *** Capturing group $13, which matches the actual Hashtag
176177
hashtagRegex.source,
177178
')'
178179
].join( "" ), 'gi' );

0 commit comments

Comments
 (0)