Skip to content

Commit 647d855

Browse files
committed
Change tests
1 parent b3a4a33 commit 647d855

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

src/Utils/TwigBuilder.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -413,11 +413,11 @@ private function isNumeric(string $value, array $properties): bool
413413
return $this->concat[$value]->isNumeric();
414414
}
415415

416-
$subParts = preg_split('/[-\*\/%]+/', $value);
417-
if (count($subParts) > 1) {
416+
$mathematicsParts = preg_split('/[-\*\/%]+/', $value);
417+
if (count($mathematicsParts) > 1) {
418418
$isNumeric = true;
419-
foreach ($subParts as $subPart) {
420-
$isNumeric = $isNumeric && $this->isNumeric($subPart, $properties);
419+
foreach ($mathematicsParts as $mathematicsPart) {
420+
$isNumeric = $isNumeric && $this->isNumeric($mathematicsPart, $properties);
421421
}
422422

423423
return $isNumeric;

tests/fixtures/concat/concat.twig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@
1616
<div>{{( size * size ) / 2 + 10}}</div>
1717
<div>{{( size * size ) % 2 + 10}}</div>
1818
<div>{{( size - 10 ) * 2 + 10}}</div>
19+
<div>{{'20 - 10 - 5' ~ 10}}</div>
1920
</div>

tests/fixtures/concat/concat.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<div v-text="( size * size ) / 2 + 10"></div>
1818
<div v-text="( size * size ) % 2 + 10"></div>
1919
<div v-text="( size - 10 ) * 2 + 10"></div>
20+
<div v-text="'20 - 10 - 5' + 10"></div>
2021
</div>
2122
</template>
2223

0 commit comments

Comments
 (0)