twitter/twitter-text-js — pull request #71 by lukeasrodgers (2012-11-28 21:28:27+00:00)
Title: Fixing bug with extracting hyphenated urls from domains without protocol

twttr.txt.extractUrls failed to extract the full url if the url contained hyphens and if the url was lacking a protocol.
E.g.:
message with http://www.hyphen-url.com -> http://www.hyphen-url.com
message with www.hyphen-url.com -> url.com
message with hyphen-url.com -> url.com

This patch adds the hyphen to the validAsciiDomain regex, and also adds a couple simple tests to cover this scenario.