lib/onebox/engine/wikipedia_onebox.rb in onebox-1.8.91 vs lib/onebox/engine/wikipedia_onebox.rb in onebox-1.8.92
- old
+ new
@@ -51,10 +51,10 @@
unless paras.empty?
cnt = 0
while text.length < Onebox::LayoutSupport.max_text && cnt <= 3
break if cnt >= paras.size
- text << " " unless cnt == 0
+ text += " " unless cnt == 0
if paras[cnt].name == "ul" #Handle UL tag. Generate a textual ordered list (1.item | 2.item | 3.item). Unfourtently no newline allowed in output
li_index = 1
list_items = []
paras[cnt].children.css("li").each { |li| list_items.push "#{li_index}." + li.inner_text ; li_index += 1 }