From d54f6faa35092d739afdc24bc23c94106588d3a5 Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 4 Feb 2014 12:57:16 +1100 Subject: [PATCH] minor style fix --- lib/pretty_text.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/pretty_text.rb b/lib/pretty_text.rb index e430931f5a2..ff36fd5c167 100644 --- a/lib/pretty_text.rb +++ b/lib/pretty_text.rb @@ -236,12 +236,12 @@ module PrettyText def self.make_all_links_absolute(html) site_uri = nil doc = Nokogiri::HTML.fragment(html) - doc.css("a").each do |l| - href = l["href"].to_s + doc.css("a").each do |link| + href = link["href"].to_s begin uri = URI(href) site_uri ||= URI(Discourse.base_url) - l["href"] = "#{site_uri}#{l['href']}" unless uri.host.present? + link["href"] = "#{site_uri}#{link['href']}" unless uri.host.present? rescue URI::InvalidURIError # leave it end