This PR was squashed before being merged into the 1.15-dev branch (closes#1336).
Discussion
----------
Added additional example to min/max doc
* fixed typo in the word "four"
* added an additional example with letters
Commits
-------
b709577 Added additional example to min/max doc
The previous one was potentially misleading if you were focussed on the actual numbers (0 is even, not odd! etc.), and 99% of the time you’re going to be passing loop.index0 into cycle, so I felt that should be included in the example.
This PR was merged into the 1.15-dev branch.
Discussion
----------
[Docs] Fix example: space missing between concatenated strings
The expression `'Hello'~'Fabien'` produces `'HelloFabien'`, not `'Hello Fabien'`. I've just added a space after `'Hello'`.
Commits
-------
d6e0357 Fix doc example: space missing between concatenated strings
The missing space between "``-3``" and "(this is just syntactic[...])" led to the ``-3`` being rendered wrong. The parser must've ignored the closing "``" when it was directly followed by a non-space character.
This PR was merged into the master branch.
Discussion
----------
Added min and max function
usefull for pagination
Commits
-------
6aa06de Added min and max function
The operator was previously described to truncate the the value when it in fact floors the result of the division (which can be seen in https://github.com/fabpot/Twig/blob/master/lib/Twig/Node/Expression/Binary/FloorDiv.php#L20).
By the old description one would think that ``{{ -20 // 7 }}`` would yield -2 (as in ``(int)(-20/7)``) when it actually returns -3 (as in ``floor(-20/7)``). Floor is not truncate (cast to int).
This reverts commit 03926034c4, reversing
changes made to 730aa25bed.
Conflicts:
CHANGELOG
doc/tags/macro.rst
doc/templates.rst
lib/Twig/ExpressionParser.php
This PR was merged into the master branch.
Discussion
----------
added the starts with, ends with, and matches operators
Adds three new operators:
* `ends with`
* `starts with`
* `matches`
I've not added the `contains` operator as it would be equivalent with the existing `in` one.
TODO:
* [x] add docs
* [x] fix on PHP 5.2.
Commits
-------
b66181d added the starts with, ends with, and matches operators
This PR was merged into the master branch.
Discussion
----------
Change wording of indentation coding standards
The documentation says to use indentation consistent with the main language of the **File**. But in a Twig template, that language is going to be Twig. This PR changes the wording to indicate that the indentation rules inside tags should be consistent with the main language of the **Project** Twig is being used within.
```
| Q | A
| ------------- | ---
| Doc fix? | yes
| New docs? | no
| Applies to | all
| Fixed tickets | none
```
Commits
-------
435e3b2 Update wording of the indentation coding standards documentation
09b58e1 Change wording of indentation coding standards
This PR was squashed before being merged into the master branch (closes#1202).
Discussion
----------
Missing doc details for building C extension on windows
Commits
-------
1a65132 Missing doc details for building C extension on windows
This PR was merged into the master branch.
Discussion
----------
added a way to add custom escaping strategies
This adds the possibility to define custom escapers that can be used with the `escape` filter.
That would close#1178 and #1177, but I'm not sure that this is a good idea.
What do you think?
Commits
-------
55f8b27 added a way to add custom escaping strategies