Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

Modify extractUrlsWithIndices() to correctly extract URL w/o protocol in CJK text. #16

Merged
merged 2 commits into from
Oct 28, 2011

Conversation

keitaf
Copy link
Contributor

@keitaf keitaf commented Oct 27, 2011

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]}]

@hoverbird
Copy link
Contributor

Good stuff- do you need me to update twitter.com with this version?

hoverbird added a commit that referenced this pull request Oct 28, 2011
Modify extractUrlsWithIndices() to correctly extract URL w/o protocol in CJK text.
@hoverbird hoverbird merged commit a31208d into master Oct 28, 2011
@caniszczyk caniszczyk deleted the fix_url_in_cjk branch April 1, 2014 18:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants