Skip to content

Commit

Permalink
Don't need a full regexp for this
Browse files Browse the repository at this point in the history
  • Loading branch information
scottchiefbaker committed Nov 8, 2023
1 parent bd26043 commit da0edd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sluz.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function process_block(string $str, int $char_pos = -1) {
} elseif (str_starts_with($str, '{foreach ') && preg_match('/^\{foreach (\$\w[\w.]*) as \$(\w+)( => \$(\w+))?\}(.+)\{\/foreach\}$/s', $str, $m)) {
$ret = $this->foreach_block($m);
// Include {include file='my.stpl' number='99'}
} elseif (str_starts_with($str, '{include ') && preg_match('/^\{include.+?\}$/s', $str, $m)) {
} elseif (str_starts_with($str, '{include ')) {
$ret = $this->include_block($str);
// Liternal {literal}Stuff here{/literal}
} elseif (str_starts_with($str, '{literal}') && preg_match('/^\{literal\}(.+)\{\/literal\}$/s', $str, $m)) {
Expand Down

0 comments on commit da0edd5

Please sign in to comment.