Skip to content
Snippets Groups Projects
Commit b7783fba authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Trim et détection des espaces

parent 3cf9a390
No related branches found
No related tags found
No related merge requests found
Pipeline #29616 passed
...@@ -305,12 +305,13 @@ class Formule ...@@ -305,12 +305,13 @@ class Formule
} }
} }
if (trim($v) !== '') { if ('' == trim($v)){
$this->tw(['type' => 'variable', 'name' => $v], $i, $length); $this->tw(['type' => 'space', 'name' => $v], $i, $length);
}else{ }else{
$this->tw(['type' => 'space', 'value' => $v], $i, $length); $this->tw(['type' => 'variable', 'name' => trim($v)], $i, $length);
} }
/* Détection de fonctions */ /* Détection de fonctions */
$next = $this->t($i + 1); $next = $this->t($i + 1);
if ($next['type'] === 'sep' && $next['name'] === '(') { if ($next['type'] === 'sep' && $next['name'] === '(') {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment