StoryCacher: cope with failed diffbot fetches
This commit is contained in:
parent
d44d43e551
commit
2ee262fe8a
|
@ -28,7 +28,7 @@ class StoryCacher
|
||||||
j = JSON.parse(res)
|
j = JSON.parse(res)
|
||||||
|
|
||||||
# turn newlines into double newlines, so they become paragraphs
|
# turn newlines into double newlines, so they become paragraphs
|
||||||
j["text"].gsub!("\n", "\n\n")
|
j["text"] = j["text"].to_s.gsub("\n", "\n\n")
|
||||||
|
|
||||||
while j["text"].match("\n\n\n")
|
while j["text"].match("\n\n\n")
|
||||||
j["text"].gsub!("\n\n\n", "\n\n")
|
j["text"].gsub!("\n\n\n", "\n\n")
|
||||||
|
|
Loading…
Reference in a new issue