Closed JBartelsson closed 8 years ago
Note: This is for #33
Regarding this:
if (line[0]+line[1]!="--"){
for (var Vars in this.CustomVariables){
line = line.replace(new RegExp("\\"+Vars,'g'), this.CustomVariables[Vars]);
}
this.FinalCommand += " " + line;
}
Is it is, that is really messy at the moment.
Put this into it's own function:
for (var Vars in this.CustomVariables){
line = line.replace(new RegExp("\\"+Vars,'g'), this.CustomVariables[Vars]);
}
Then call it at the beginning of processRowLine
, processJsonLine
,processCommandBlockLine
and processBangLine
.
Then inside processVariableLine
only use it to parse varValue
Note: This will also be going towards #36 - variables
multiple Lines are now in.