module Quesadilla::Extractor::Autolinks
Extract plain links.
This module has no public methods.
Private Instance Methods
extract_autolinks()
click to toggle source
# File lib/quesadilla/extractor/autolinks.rb, line 13 def extract_autolinks Twitter::Extractor::extract_urls_with_indices(@working_text).each do |entity| entity_text = entity[:url] @entities << { type: ENTITY_TYPE_LINK, text: entity_text, display_text: display_url(entity[:url]), url: quality_url(entity[:url]), indices: entity[:indices] } @working_text.sub!(entity_text, REPLACE_TOKEN * entity_text.length) end end