Skip to content

Conversation

@dorian-marchal
Copy link
Contributor

@dorian-marchal dorian-marchal commented Feb 27, 2020

While not unit tested, TwigPHP's last filter returns the last digit of
a number, not "".

With TwigPHP:

{{ 14|last }} # returns '4'

Currently, with twig.js

{{ 14|last }} # returns ''

See: https://twigfiddle.com/e28i2l

While not unit tested, TwigPHP's `last` filter returns the last digit of
a number, not "".
@RobLoach RobLoach merged commit 7399c7e into twigjs:master Feb 27, 2020
@RobLoach
Copy link
Collaborator

Thanks a lot... Hadn't considered numbers as individual character digits.

@dorian-marchal dorian-marchal deleted the fix-last-for-numbers branch February 27, 2020 15:59
@ringods
Copy link

ringods commented Mar 12, 2020

@dorian-marchal
Copy link
Contributor Author

It is not released, yet, but I will. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants