Skip to content
This repository was archived by the owner on Oct 20, 2025. It is now read-only.

Commit 08be472

Browse files
authored
Merge pull request #34 from PhpSlides/dev
fixes bugs & errors
2 parents aef6ca8 + 2224c92 commit 08be472

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Formatter/Views/FormatPslTags.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ protected function psl_tags()
3838
function ($matches) {
3939
// Trim the content inside the PHP tags, removing trailing semicolons
4040
$val = trim($matches[1]);
41-
$val = trim($val, ';');
41+
$val = str_ends_with(')', $val) ? $val . ';' : $val;
4242

4343
// Reformat the PHP content and return it
44-
return '<' . '?php ' . $val . '; ?' . '>';
44+
return '<' . '?php ' . $val . ' ?' . '>';
4545
},
4646
$this->contents
4747
);

0 commit comments

Comments
 (0)