10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-12-24 13:23:40 +01:00

Fix bug in run

This commit is contained in:
Mickaël Véril 2019-12-12 15:18:48 +01:00
parent 39ad0ab933
commit f6c05e7505

View File

@ -43,12 +43,12 @@ class newCommand(commandBase):
else: else:
for cmd in cmds: for cmd in cmds:
if self.argNum==0: if self.argNum==0:
res=self.result fres=self.result
else: else:
resultstr=str(self.result) resultstr=str(self.result)
res=TexSoup(re.sub('\#([1-{}])'.format(self.argNum),lambda m: cmd.args[int(m.group(1))-1].value,resultstr)) res=TexSoup(re.sub('\#([1-{}])'.format(self.argNum),lambda m: cmd.args[int(m.group(1))-1].value,resultstr))
soup=TexSoup(res) fres=TexSoup(res)
tex.replace(cmd,soup) tex.replace(cmd,fres)
def tryRun(): def tryRun():
cmds=list(tex.find_all(self.commandName)) cmds=list(tex.find_all(self.commandName))