10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-12-25 13:53:48 +01: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 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(f'\#([1-{self.argNum}])',lambda m: cmd.args[int(m.group(1))-1].value,resultstr))
fres=TexSoup(res) fres=TexSoup(res)
tex.replace(cmd,fres) if str(tex)==str(cmd):
tex.expr=fres.expr
else:
def tryRun(): def tryRun():
cmds=list(tex.find_all(self.commandName)) cmds=list(tex.find_all(self.commandName))