twitter/twitter-text-js — pull request #16 by keitaf (2011-10-27 06:51:22+00:00)
Title: Modify extractUrlsWithIndices() to correctly extract URL w/o protocol in CJK text.

This fixes a bug in extractUrlsWithIndices() to correctly extract URL w/o protocol in CJK text

Current behavior:
extractUrlsWithIndices("twitter.comテストgoogle.com")
=> [{:url=>"twitter.com", :indices=>[0, 25]}]
# Only 1st URL is extracted. Also indices incorrect.

Correct behavior:
extractUrlsWithIndices("twitter.comテストgoogle.com")
=> [{:url=>"twitter.com", :indices=>[0, 11]}, {:url=>"google.com", :indices=>[14, 24]}]