10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-07-22 18:57:38 +02:00

Try to fix a bug

This commit is contained in:
Mickaël Véril 2020-02-06 15:42:49 +01:00
parent 720948ecab
commit ba5ff99acd

View File

@ -46,9 +46,13 @@ class newCommand(commandBase):
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))
res=TexSoup(re.sub(f'\#([1-{self.argNum}])',lambda m: cmd.args[int(m.group(1))-1].value,resultstr))
fres=TexSoup(res)
tex.replace(cmd,fres)
if str(tex)==str(cmd):
tex.expr=fres.expr
else:
def tryRun():
cmds=list(tex.find_all(self.commandName))