From b5053a91551156c3be6321c5b87f26f54f465194 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 2 May 2020 17:01:58 +0000 Subject: [PATCH] Formatting content before saving patch --- inbox.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/inbox.py b/inbox.py index b7ba31976..204aeb1b3 100644 --- a/inbox.py +++ b/inbox.py @@ -1708,8 +1708,12 @@ def gitPatchNotify(baseDir: str, handle: str, patchFile = accountDir + '/.newPatch' with open(patchFile, 'w') as fp: fp.write(subject) + contentStr = content.replace('
', '\n').replace('
', '\n') + contentStr = contentStr.replace('

', '').replace('

', '\n') + if 'From ' in contentStr: + contentStr = contentStr.split('From ', 1)[1] with open(patchFile + 'Content', 'w') as fp: - fp.write(content) + fp.write(contentStr) def groupHandle(baseDir: str, handle: str) -> bool: