title: Passing a macro argument to an if == test in jinja?
body: <p>I'm using Tarbell to publish a formatted version of an inventory spreadsheet. Every row has a category, so I can do something like this:</p>
  
  <pre><code>&lt;h2&gt;Power Tools&lt;/h2&gt;
  {% for row in inventory %}
    {% if row.Category == "powertools" %}
      &lt;b&gt;{{ row.Display_Name|e }}&lt;/b&gt; &lt;br /&gt;
    {% endif %}
  {% endfor %}
  
  &lt;h2&gt;A/V Gear&lt;/h2&gt;
  {% for row in inventory %}
    {% if row.Category == "av" %}
      &lt;b&gt;{{ row.Display_Name|e }}&lt;/b&gt;&lt;br /&gt;
    {% endif %}
  {% endfor %}
  </code></pre>
  
  <p>To get a list of all the power tools followed by a list of A/V gear. I'd like to move that into a macro that I can call with a couple of arguments. I've got this: </p>
  
  <pre><code>  {% macro list(cat, title='') -%}
        &lt;p&gt;Category: {{ cat }}; Header: {{ title }}&lt;/p&gt;
        {% for row in inventory %}
          {% if row.Category == "{{ cat }}" %}
            &lt;b&gt;{{ row.Display_Name|e }}&lt;/b&gt;&lt;br /&gt;
          {% endif %}
        {% endfor %}
    {%- endmacro %}
  </code></pre>
  
  <p>When I call it with:</p>
  
  <pre><code>  {{ list('av', title='Cameras and Audio Recorders')}}
    {{ list('powertools', title='Power Tools')}}
  </code></pre>
  
  <p>I see "Category: powertools; Header: Power Tools" and "Category: av; Header: Cameras and Audio Recorders" as expected, so I know the macro can hear me, but the list itself doesn't show up. Can I use a macro argument in a comparison test? How?</p>