From 497fc52a7dc5941994d8d332a0f18c89c336ab27 Mon Sep 17 00:00:00 2001 From: alex Date: Sat, 12 Mar 2022 14:25:58 +0100 Subject: [PATCH] Fix odd newlines --- from_old_blog.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/from_old_blog.py b/from_old_blog.py index 096eb37..fc3d698 100644 --- a/from_old_blog.py +++ b/from_old_blog.py @@ -35,6 +35,8 @@ for post in posts: post["post"] = post["post"].encode("iso-8859-1").decode("utf8") post["title"] = post["title"].encode("iso-8859-1").decode("utf8") + post["post"] = post["post"].replace("\\r\\n", "") + t = post["title"] y,m,d = post["posted"].split(" ")[0].split("-") -- 2.47.3