Closed asvishnyakov closed 7 years ago
Need to add new liquid filter format
similar as is made there
https://github.com/dotliquid/dotliquid/issues/111
Filter works as expected:
{% assign test = 11.22 %}
{{ test | format: '#0.000' }}
output: 11.220
{% assign test = 11.22 %}
{{ test | format: 'e3' }}
output: 1.122E+001
(syntax is the same as for Int32.ToString), but it's not applicable to prices, because they renders on client side through angular. Standard angular number filter with may be used instead to specify fraction size.
In gitter client says:
Do not use this code, because you will loose a part of fraction. Instead, add options for
round
or create new tag.