10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-12-25 13:53:48 +01: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): if str(tex)==str(cmd):
tex.expr=fres.expr tex.expr=fres.expr
else: else:
tex.replace(cmd,fres) try:
tex.replace(cmd,fres)
except:
return False
return True
def tryRun(self,tex): def tryRun(self,tex):
cmds=list(tex.find_all(self.commandName)) cmds=list(tex.find_all(self.commandName))
if len(cmds)!=0: if len(cmds)!=0:
@ -68,7 +72,9 @@ class newCommand(commandBase):
cmds=[cmd for cmd in collection if cmd.exist(tex)] cmds=[cmd for cmd in collection if cmd.exist(tex)]
if(len(cmds)>0): if(len(cmds)>0):
for cmd in cmds: for cmd in cmds:
cmd.run(tex) if not cmd.run(tex):
cmds.remove(cmd)
collection.remove(cmd)
newCommand.runAll(tex,collection) newCommand.runAll(tex,collection)
class columnAlignment(Enum): class columnAlignment(Enum):
Left = "l" Left = "l"