mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-11 18:06:46 +00:00
ae82e8bd0dfe497d6c7539b73d32a13e96b9c294
This PR was merged into the 3.x branch.
Discussion
----------
Simplify EscaperNodeVisitor code
This PR simplifies how we escape the ternary operator, and simplifies the whole strategy.
Instead of replacing the `PrintNode`s, we instead "just" wrap the inner expressions.
For the ternary operator, the `InlinePrint` expression is useless and even weird as printing something in the middle of an expression looks very wrong. This is not done anymore and the node is deprecated.
Overall, this PR makes fewer changes to the Node tree which should make things use a bit less memory.
Commits
-------
02cec77619 Simplify EscaperNodeVisitor code
…
Twig, the flexible, fast, and secure template language for PHP
==============================================================
Twig is a template language for PHP.
Twig uses a syntax similar to the Django and Jinja template languages which
inspired the Twig runtime environment.
Sponsors
--------
.. raw:: html
<a href="https://docs.blackfire.io/introduction?utm_source=twig&utm_medium=github_readme&utm_campaign=logo">
<img src="https://static.blackfire.io/assets/intemporals/logo/png/blackfire-io_secondary_horizontal_transparent.png?1" width="255px" alt="Blackfire.io">
</a>
More Information
----------------
Read the `documentation`_ for more information.
.. _documentation: https://twig.symfony.com/documentation
Description
Languages
PHP
99.9%