Commit b7783fba authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Trim et détection des espaces

parent 3cf9a390
Loading
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -305,12 +305,13 @@ class Formule
            }
        }

        if (trim($v) !== '') {
            $this->tw(['type' => 'variable', 'name' => $v], $i, $length);
        if ('' == trim($v)){
            $this->tw(['type' => 'space', 'name' => $v], $i, $length);
        }else{
            $this->tw(['type' => 'space', 'value' => $v], $i, $length);
            $this->tw(['type' => 'variable', 'name' => trim($v)], $i, $length);
        }


        /* Détection de fonctions */
        $next = $this->t($i + 1);
        if ($next['type'] === 'sep' && $next['name'] === '(') {