diff --git a/app/normalizers/reddit_normalizer.rb b/app/normalizers/reddit_normalizer.rb index 58ac9245..5244d446 100644 --- a/app/normalizers/reddit_normalizer.rb +++ b/app/normalizers/reddit_normalizer.rb @@ -10,7 +10,7 @@ def published_at def text source_url = extract_source_url source_reference = source_url.present? ? "#{separator}#{source_url}" : "" - "#{title}#{source_reference}\nThread: #{link}" + "#{title}#{source_reference}\n\nThread: #{link}" end private diff --git a/spec/fixtures/files/feeds/reddit/normalized.json b/spec/fixtures/files/feeds/reddit/normalized.json index ba767c49..b022053f 100644 --- a/spec/fixtures/files/feeds/reddit/normalized.json +++ b/spec/fixtures/files/feeds/reddit/normalized.json @@ -3,7 +3,7 @@ "uid": "https://www.reddit.com/r/worldnews/comments/167sdt8/rworldnews_live_thread_russian_invasion_of/", "link": "https://www.reddit.com/r/worldnews/comments/167sdt8/rworldnews_live_thread_russian_invasion_of/", "published_at": "2023-09-02 04:02:37 +0000", - "text": "/r/WorldNews Live Thread\nThread: https://www.reddit.com/r/worldnews/comments/167sdt8/rworldnews_live_thread_russian_invasion_of/", + "text": "/r/WorldNews Live Thread\n\nThread: https://www.reddit.com/r/worldnews/comments/167sdt8/rworldnews_live_thread_russian_invasion_of/", "attachments": [], "comments": [], "validation_errors": [] @@ -12,7 +12,7 @@ "uid": "https://www.reddit.com/r/worldnews/comments/167ucb5/meta_and_alphabet_would_owe_at_least_4_of_annual/", "link": "https://www.reddit.com/r/worldnews/comments/167ucb5/meta_and_alphabet_would_owe_at_least_4_of_annual/", "published_at": "2023-09-02 05:49:28 +0000", - "text": "Meta and Alphabet would owe at least 4% of annual revenue in Canada to news outlets under draft regulations pushed by Justin Trudeau - https://fortune.com/2023/09/01/meta-alphabet-canada-news-outlets-draft-regulations-justin-trudeau/\nThread: https://www.reddit.com/r/worldnews/comments/167ucb5/meta_and_alphabet_would_owe_at_least_4_of_annual/", + "text": "Meta and Alphabet would owe at least 4% of annual revenue in Canada to news outlets under draft regulations pushed by Justin Trudeau - https://fortune.com/2023/09/01/meta-alphabet-canada-news-outlets-draft-regulations-justin-trudeau/\n\nThread: https://www.reddit.com/r/worldnews/comments/167ucb5/meta_and_alphabet_would_owe_at_least_4_of_annual/", "attachments": [], "comments": [], "validation_errors": []