Skip to content

Commit

Permalink
add to exclude list directly
Browse files Browse the repository at this point in the history
  • Loading branch information
SonyPradana committed Sep 17, 2024
1 parent 97f6068 commit 0a78b6d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions src/System/View/Templator/DirectiveTemplator.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class DirectiveTemplator extends AbstractTemplatorParse
'foreach' => EachTemplator::class,
'if' => IfTemplator::class,
'include' => IncludeTemplator::class,
'json' => JsonTemplator::class,
'php' => PHPTemplator::class,
'raw' => NameTemplator::class,
'section' => SectionTemplator::class,
Expand Down
2 changes: 0 additions & 2 deletions src/System/View/Templator/JsonTemplator.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ class JsonTemplator extends AbstractTemplatorParse
{
public function parse(string $template): string
{
DirectiveTemplator::$excludeList['json'] = JsonTemplator::class;

return preg_replace_callback(
'/{%\s*json\(\s*(.+?)\s*(?:,\s*(\d+)\s*)?(?:,\s*(\d+)\s*)?\)\s*%}/',
static function ($matches): string {
Expand Down

0 comments on commit 0a78b6d

Please sign in to comment.