lib/onebox/engine/wikipedia_onebox.rb in onebox-1.8.89 vs lib/onebox/engine/wikipedia_onebox.rb in onebox-1.8.90

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + module Onebox module Engine class WikipediaOnebox include Engine include LayoutSupport @@ -61,10 +63,10 @@ else paragraph = paras[cnt].inner_text[0..Onebox::LayoutSupport.max_text] end paragraph.gsub!(/\[\d+\]/mi, "") - text << paragraph + text += paragraph cnt += 1 end end text = "#{text[0..Onebox::LayoutSupport.max_text]}..." if text.length > Onebox::LayoutSupport.max_text result = {