hacky support for /* */ comments in json config

This commit is contained in:
Sascha Nitsch 2024-08-29 20:09:46 +02:00
parent aff1643bb3
commit 91c93f1fe8

View file

@ -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";