apapsch/twig-extensions

Common additional features for Twig that do not directly belong in core

1.6.0 2019-06-28 10:33 UTC

README

This repository hosts Twig Extensions that do not belong to the core but can be nonetheless interesting to share with other developers.

Fork this repository, add your extension, and request a pull.

More Information

Read the documentation for more information.

Changes from upstream

This is a long term fork from twigphp/Twig-extensions, because some change that is important to me won't be merged.

  • `Twig_Extensions_Node_Trans`: Replaces consecutive whitespace and line breaks with a single space. This is similar to the default HTML text node behavior and allows you to have normal text as translation messages, which may span multiple lines. This change was not merged upstream, because it may break existing translation messages. It's useful if you are accustomed to gettext style translation messages and want to have HTML text node behavior.