This is a proper bug report for PR #3256.
Code sample:
{{ 42 == '42' ? '.' : 'F' -}}
{{ '42' == 42 ? '.' : 'F' -}}
{{ 42 == ' 42' ? '.' : 'F' -}}
{{ ' 42' == 42 ? '.' : 'F' -}}
{{ 42 == '42 ' ? '.' : 'F' -}}
{{ '42 ' == 42 ? '.' : 'F' -}}
{{ 42.0 == '42.0' ? '.' : 'F' -}}
{{ '42.0' == 42.0 ? '.' : 'F' -}}
{{ 42.0 == ' 42.0' ? '.' : 'F' -}}
{{ ' 42.0' == 42.0 ? '.' : 'F' -}}
{{ 42.0 == '42.0 ' ? '.' : 'F' -}}
{{ '42.0 ' == 42.0 ? '.' : 'F' -}}
Output in v1.42.0 and v2.12.5:
............
Output in v3.0.3:
..........FF
Note that only the "float with trailing space" tests fail (whereas the "float with leading space" tests pass, and all the "int" tests pass).
Mini test harness: https://twigfiddle.com/6angrk
This is a proper bug report for PR #3256.
Code sample:
{{ 42 == '42' ? '.' : 'F' -}} {{ '42' == 42 ? '.' : 'F' -}} {{ 42 == ' 42' ? '.' : 'F' -}} {{ ' 42' == 42 ? '.' : 'F' -}} {{ 42 == '42 ' ? '.' : 'F' -}} {{ '42 ' == 42 ? '.' : 'F' -}} {{ 42.0 == '42.0' ? '.' : 'F' -}} {{ '42.0' == 42.0 ? '.' : 'F' -}} {{ 42.0 == ' 42.0' ? '.' : 'F' -}} {{ ' 42.0' == 42.0 ? '.' : 'F' -}} {{ 42.0 == '42.0 ' ? '.' : 'F' -}} {{ '42.0 ' == 42.0 ? '.' : 'F' -}}Output in v1.42.0 and v2.12.5:
............Output in v3.0.3:
..........FFNote that only the "float with trailing space" tests fail (whereas the "float with leading space" tests pass, and all the "int" tests pass).
Mini test harness: https://twigfiddle.com/6angrk