hacky support for /* */ comments in json config
parent
aff1643bb3
commit
91c93f1fe8
|
@ -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 New Issue