link_to_hashtag

in rb/lib/twitter-text/autolink.rb [337:362]


      def link_to_hashtag(entity, chars, options = {})
        hash = chars[entity[:indices].first]
        hashtag = entity[:hashtag]
        hashtag = yield(hashtag) if block_given?
        hashtag_class = options[:hashtag_class].to_s

        if hashtag.match Twitter::TwitterText::Regex::REGEXEN[:rtl_chars]
          hashtag_class += ' rtl'
        end

        href = if options[:hashtag_url_block]
                 options[:hashtag_url_block].call(hashtag)
               else
                 "#{options[:hashtag_url_base]}#{hashtag}"
               end

        html_attrs = {
          :class => hashtag_class,
          
          
          :title => "##{hashtag}"
        }.merge(options[:html_attrs])

        link_to_text_with_symbol(entity, hash, hashtag, href, html_attrs, options)
      end