paularmstrong/swig — Issue #53: Setting a template variable to a number makes it a string
Author: imbcmdth
Created: 2012-02-16 17:52:55+00:00
State: open

Given this code:

{% set testValue = 1 %}
{{ testValue|add(1) }}

The output is:

11

Expected:

2

Inside of a forloop, the loop's *index* property functions as a number with the *add* filter properly summing the values numerically instead of performing string concatenating. This leads me to believe the problem is with the *set* tag itself.