twitter-text-rb icon indicating copy to clipboard operation
twitter-text-rb copied to clipboard

Do not autolink URLs

Open frankie-loves-jesus opened this issue 11 years ago • 4 comments

Is there a way to not autolink URLs?

From what I understand, twitter-text-rb isn't really meant for URLs, so I prefer letting https://github.com/vmg/rinku deal with that.

frankie-loves-jesus avatar Dec 31 '13 10:12 frankie-loves-jesus

Yes such issue does exist, like it does not recognize www.google.com

hongtaocai avatar Jan 10 '14 16:01 hongtaocai

Yes, that too.

Shouldn't Twitter Text stick to hashtags and mentions? Why even bother to autolink URLs when it has nothing to do with Twitter Text?

To quote the Unix philosophy by Bob McIlroy:

Write programs that do one thing and do it well

frankie-loves-jesus avatar Apr 13 '14 16:04 frankie-loves-jesus

Twitter-text isn't the best autolinker, but it does reliably define how URL's will be treated in tweets. It works across Java, JS, Ruby, Obj-C, and others that adhere to conformance. If you just need URL linking, irrespective of Twitter, this isn't your best choice. You can autolink @names #hashtags and $cashtags separately too with each library.

jakl avatar Apr 14 '14 01:04 jakl

Have to agree, when using twitter-text in conjunction with something like rinku for url/mailto' linking they do clash somewhat - however I can understand @jakl's point of view.

I'd probably suggest adding an option as rinku does which allows you to specify which links get converted by twitter-text, so you can choose just mentions and hashtags.

SirRawlins avatar Nov 06 '14 10:11 SirRawlins