summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2016-05-18 21:55:03 -0500
committerYorick Peterse <yorickpeterse@gmail.com>2016-05-18 21:55:03 -0500
commit5c8c741648d38ab2b15a542cf61c5f7830050770 (patch)
treed90cc30b8d80805ebd0123179dd2431b53720850
parente8b1aa40b985c0e209fe6eafe8061c558067c5ce (diff)
downloadgitlab-ce-5c8c741648d38ab2b15a542cf61c5f7830050770.tar.gz
Hard return in ReferenceExtractor#html_documents
-rw-r--r--lib/banzai/reference_extractor.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/banzai/reference_extractor.rb b/lib/banzai/reference_extractor.rb
index 09eead23893..bf366962aef 100644
--- a/lib/banzai/reference_extractor.rb
+++ b/lib/banzai/reference_extractor.rb
@@ -21,11 +21,9 @@ module Banzai
def html_documents
# This ensures that we don't memoize anything until we have a number of
# text blobs to parse.
- if @texts.empty?
- []
- else
- @html_documents ||= @texts.map { |html| Nokogiri::HTML.fragment(html) }
- end
+ return [] if @texts.empty?
+
+ @html_documents ||= @texts.map { |html| Nokogiri::HTML.fragment(html) }
end
end
end