title: Jinja2 template not rendering if-elif-else statement properly
body: <p>I am trying to set the text color using css in a jinja2 template.  In the following code  I want to set the output string to print in a specific font color if the variable contains a string.  Everytime the template is generated though it prints in red due to the else statement, it never see the first two conditions even though the output should be matched, I can tell what the output from the variable is when the table generates and it is as expected.  I know my css is correct due to the printing of the string in red by default.</p>
  <p>My first thought was to enclose the string I was checking for in quotes but that didn't work.  Next was that jinja was not expanding <code>RepoOutput[RepoName.index(repo)]</code> but the for loop above it works, <code>RepoName</code> is expanded upon properly.  I know if I add the braces it will print the variable which I am fairly certain will either break the template or just not work.</p>
  <p>I tried looking at these sites and went through the list of global expressions as well but couldn't find any examples similar to mine or a direction in which to look further.</p>
  <p><a href="http://jinja.pocoo.org/docs/templates/#if" rel="noreferrer">http://jinja.pocoo.org/docs/templates/#if</a></p>
  <p><a href="http://wsgiarea.pocoo.org/jinja/docs/conditions.html" rel="noreferrer">http://wsgiarea.pocoo.org/jinja/docs/conditions.html</a></p>
  <pre><code>   {% for repo in RepoName %}
         &lt;tr&gt;
            &lt;td&gt; &lt;a href=&quot;http://mongit201.be.monster.com/icinga/{{ repo }}&quot;&gt;{{ repo }}&lt;/a&gt; &lt;/td&gt;
         {% if error in RepoOutput[RepoName.index(repo)] %}
            &lt;td id=error&gt; {{ RepoOutput[RepoName.index(repo)] }} &lt;/td&gt; &lt;!-- I want this in green if it is up-to-date, otherwise I want it in red --&gt;
         {% elif Already in RepoOutput[RepoName.index(repo)] %}
            &lt;td id=good&gt; {{ RepoOutput[RepoName.index(repo)] }} &lt;/td&gt;   &lt;!-- I want this in green if it is up-to-date, otherwise I want it in red --&gt;
         {% else %}
              &lt;td id=error&gt; {{ RepoOutput[RepoName.index(repo)] }} &lt;/td&gt; &lt;!-- I want this in green if it is up-to-date, otherwise I want it in red --&gt;
         &lt;/tr&gt;
  
         {% endif %}
     {% endfor %}
  </code></pre>
  <p>Thanks</p>