10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-08-25 13:41:50 +02: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:
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))