Skip to content

Commit

Permalink
Latte 3.0.14 wip
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Feb 8, 2024
1 parent f6861e7 commit 03fadc8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Bridges/ApplicationLatte/Nodes/ControlNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ public static function create(Tag $tag): static
}

$modifier = $tag->parser->parseModifier();
/*$modifier->defineFlags('noescape'); // v3.0.14?
$node->escape = $modifier->escape;
if ($modifier->filters) {
throw new Latte\CompileException('Only modifier |noescape is allowed here.', reset($modifier->filters)->position);
}*/
foreach ($modifier->filters as $filter) {
match ($filter->name->name) {
'noescape' => $node->escape = false,
Expand Down
1 change: 1 addition & 0 deletions src/Bridges/ApplicationLatte/Nodes/LinkNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public static function create(Tag $tag): ?static
$tag->parser->stream->tryConsume(',');
$node->args = $tag->parser->parseArguments();
$node->modifier = $tag->parser->parseModifier();
$node->modifier->defineFlags('noescape'); // v 3.0.14, neni potreba nastavovat $escape a $check
$node->modifier->escape = true;
$node->modifier->check = false;
$node->mode = $tag->name;
Expand Down

0 comments on commit 03fadc8

Please sign in to comment.