From f6c05e75053bbda286e408c018cecfb08d8b2075 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20V=C3=A9ril?= Date: Thu, 12 Dec 2019 15:18:48 +0100 Subject: [PATCH] Fix bug in run --- tools/lib/LaTeX.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/lib/LaTeX.py b/tools/lib/LaTeX.py index f31e7b7e..a8050473 100644 --- a/tools/lib/LaTeX.py +++ b/tools/lib/LaTeX.py @@ -43,12 +43,12 @@ class newCommand(commandBase): else: for cmd in cmds: if self.argNum==0: - res=self.result + fres=self.result else: resultstr=str(self.result) res=TexSoup(re.sub('\#([1-{}])'.format(self.argNum),lambda m: cmd.args[int(m.group(1))-1].value,resultstr)) - soup=TexSoup(res) - tex.replace(cmd,soup) + fres=TexSoup(res) + tex.replace(cmd,fres) def tryRun(): cmds=list(tex.find_all(self.commandName))