hacky support for /* */ comments in json config

develop
Sascha Nitsch 2024-08-29 20:09:46 +02:00
parent aff1643bb3
commit 91c93f1fe8
1 changed files with 2 additions and 0 deletions

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