10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-07-22 18:57:38 +02:00
This commit is contained in:
Mickaël Véril 2020-02-09 14:04:03 +01:00
parent 4c72f4ff5d
commit ee1ab50501

View File

@ -51,7 +51,11 @@ class newCommand(commandBase):
if str(tex)==str(cmd):
tex.expr=fres.expr
else:
tex.replace(cmd,fres)
try:
tex.replace(cmd,fres)
except:
return False
return True
def tryRun(self,tex):
cmds=list(tex.find_all(self.commandName))
if len(cmds)!=0:
@ -68,7 +72,9 @@ class newCommand(commandBase):
cmds=[cmd for cmd in collection if cmd.exist(tex)]
if(len(cmds)>0):
for cmd in cmds:
cmd.run(tex)
if not cmd.run(tex):
cmds.remove(cmd)
collection.remove(cmd)
newCommand.runAll(tex,collection)
class columnAlignment(Enum):
Left = "l"