Module: Spix::Utils
Instance Method Summary collapse
Instance Method Details
#format_links(options) ⇒ Object
34 35 36 37 38 39 40 41 42 |
# File 'lib/spix_parser/parser.rb', line 34 def format_links() text = [:text] site_url = [:site_url] parse_links(text, site_url) parse_images(text, site_url) text end |
#publisher_special_case(options) ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/spix_parser/parser.rb', line 44 def publisher_special_case() text = [:text] url = [:url] begin case publisher = URI.parse(url).host when /ig\.com/ (text, 'span', :class => 'inclusion') else text end rescue text end end |