Fabien Potencier f765a753fb minor #4798 [Doc] Reword whitespace control note about first-newline removal (Amoifr)
This PR was merged into the 3.x branch.

Discussion
----------

[Doc] Reword whitespace control note about first-newline removal

Fixes #4720.

The wording on line 1224 of `doc/templates.rst` ("removal of the first newline **inherited from PHP**") was misleading — Twig does not inherit anything from PHP, it deliberately implements the same behavior (just like Jinja does, which uses *"like in PHP"* in its own documentation).

The note already exists a few lines above (line 1210: *"The first newline after a template tag is removed automatically (like in PHP)."*), so the second mention can just point back to it instead of duplicating the (incorrect) attribution.

Commits
-------

6904b23fb6 [Doc] Reword whitespace control note about first-newline removal
2026-05-14 18:41:00 +01:00
2026-02-07 09:07:38 +01:00
2026-03-17 22:31:57 +01:00
2026-03-17 22:37:10 +01:00
2026-02-07 09:12:49 +01:00
2024-11-20 20:05:33 +01:00
2024-09-03 10:17:14 +02:00

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
Languages
PHP 99.9%