From fd9a49b157d52763f63688e4f5bb86ec1ed93fcc Mon Sep 17 00:00:00 2001 From: MarkusRost <2701034-MarkusRost@users.noreply.gitlab.com> Date: Tue, 20 Jul 2021 06:16:34 +0000 Subject: [PATCH] fix moved lines edit diff sync error --- src/misc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/misc.py b/src/misc.py index f02e8cc..79e5881 100644 --- a/src/misc.py +++ b/src/misc.py @@ -193,7 +193,7 @@ class ContentParser(HTMLParser): if self.last_ins is not None: self.ins_length += 1 if self.empty and not self.last_ins.isspace(): - if "**" not in self.last_ins: + if "**" in self.last_ins: self.last_ins = self.last_ins.replace("**", "__") self.ins_length += 4 self.last_ins = "**" + self.last_ins + "**" @@ -204,7 +204,7 @@ class ContentParser(HTMLParser): if self.last_del is not None: self.del_length += 1 if self.empty and not self.last_del.isspace(): - if "~~" not in self.last_del: + if "~~" in self.last_del: self.last_del = self.last_del.replace("~~", "__") self.del_length += 4 self.last_del = "~~" + self.last_del + "~~"