twitter-archive / twitter-text-objc

An Objective-C implementation of Twitter's text processing library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Call to URLsInText: fails to return for certain input.

Krystox opened this issue · comments

Call to URLsInText: in TwitterText.m never returns on certain input text. (Hanging at line NSTextCheckingResult *urlResult = [[self validURLRegexp] firstMatchInString:text options:NSMatchingWithoutAnchoringBounds range:NSMakeRange(position, len - position)];)

Many text can cause this problem. Here are some examples:

text = @"JA.JA.JA.JA.JA.JA.JA.JA.JA.JA.JA.JA.JA.JA.JA.JA.JA.JA.JA.JA.JA.JA.JA.JA.JA.JA.JA.JA.JA.JA.JA.JA";

text = @"JB.JB.JB.JB.JB.JB.JB.JB.JB.JB.JB.JB.JB.JB.JB.JB.JB.JB.JB.JB.JB.JB.JB.JB.JB.JB.JB.JB.JB.JB.JB.JB";

Thanks for your report. Fixed in 52fda8e