twitter/twitter-text-rb — pull request #24 by seldo (2011-12-06 21:03:14+00:00)
Title: Adding $ as an invalid preceding char for domain names

This two-character patch prevents a string being identified as a link if the domain name is preceded by a $ symbol.

It's a common Twitter convention when talking about stocks to precede the ticker symbol with a dollar sign, e.g. $AAPL. When talking about stocks on other exchanges, the name of the exchange is sometimes appended to the symbol, e.g. when talking about Canadian stocks, you might use $TVI.TO (for Toronto exchange) or $RBS.CA (meaning Canada).

The current twitter-text-rb correctly identifies "tvi.to" and "rbs.ca" as potentially valid domain names. However, when preceded by a dollar sign this should not happen, otherwise "tvi.to" etc. will get converted into links or shortened URLs in some circumstances.