hacky support for /* */ comments in json config
This commit is contained in:
parent
aff1643bb3
commit
91c93f1fe8
1 changed files with 2 additions and 0 deletions
|
@ -205,6 +205,8 @@ class Main
|
|||
$this->control->mousemove(960, 500);
|
||||
|
||||
$steps = file_get_contents($instructions);
|
||||
$steps = preg_replace('/[\r\n]/', '', $steps);
|
||||
$steps = preg_replace('!/\*.*\*/!', '', $steps);
|
||||
$plans = json_decode($steps, true);
|
||||
if ($plans === null) {
|
||||
echo "error reading config\n";
|
||||
|
|
Loading…
Reference in a new issue