twitter/twitter-text-js — pull request #27 by keitaf (2011-12-12 19:45:02+00:00)
Title: Consolidate extractMention* and autolinkUsername* regex patterns into validMentionOrList

There are almost identical but slightly different regex patterns for extracting at_mention/list and auto-linking at_mention/list. Because of the difference, at_mention/list preceded by "RT" or "RT:" is auto-linked, but not extracted as entity.

This will consolidate extractMentions* and autolinkUsername* regex patterns into a single validMentionOrList, and use it both in auto-linking and extracting at-mentions/lists. This makes the behavior of auto-linker and extractor consistent.