in rb/lib/twitter-text/autolink.rb [382:410]
def link_to_screen_name(entity, chars, options = {})
name = "#{entity[:screen_name]}#{entity[:list_slug]}"
chunk = name.dup
chunk = yield(chunk) if block_given?
at = chars[entity[:indices].first]
html_attrs = options[:html_attrs].dup
if entity[:list_slug] && !entity[:list_slug].empty? && !options[:suppress_lists]
href = if options[:list_url_block]
options[:list_url_block].call(name)
else
"#{options[:list_url_base]}#{name}"
end
html_attrs[:class] ||= "#{options[:list_class]}"
else
href = if options[:username_url_block]
options[:username_url_block].call(chunk)
else
"#{options[:username_url_base]}#{name}"
end
html_attrs[:class] ||= "#{options[:username_class]}"
end
link_to_text_with_symbol(entity, at, chunk, href, html_attrs, options)
end