From 9249e0015226ab3782b797e0f76f0144c9b34dcd Mon Sep 17 00:00:00 2001 From: Carl Chenet Date: Mon, 30 Dec 2019 18:57:02 +0100 Subject: [PATCH] interpret linebreak. fixes #42 --- feed2toot/message.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/feed2toot/message.py b/feed2toot/message.py index 8ccbad0..b7f4ea9 100644 --- a/feed2toot/message.py +++ b/feed2toot/message.py @@ -29,8 +29,10 @@ from feed2toot.tootpost import TootPost def build_message(entrytosend, tweetformat, rss): '''populate the rss dict with the new entry''' tweetwithnotag = tweetformat.format(**entrytosend) + # replace line breaks + tootwithlinebreaks = tweetwithnotag.replace('\\n', '\n') # remove duplicates from the final tweet - dedup = RemoveDuplicates(tweetwithnotag) + dedup = RemoveDuplicates(tootwithlinebreaks) # only append hashtags if they exist # remove last tags if tweet too long if 'hashtags' in rss: