{% comment %}
    Used to turn markdown tables into HTML tables
{% endcomment %}
<div class="table-wrap">
{% comment %}
    The Datatables jquery plugin requires a width of 100% on table tags to
    correctly calulate relative sizes
{% endcomment %}
    <table width="100%">
        {% if caption %}
            <caption>{{ caption }}</caption>
        {% endif %}
        <thead>
        {% for row in header %}
            <tr>
            {% for th in row %}
                <th rowspan="{{ th.rowspan }}" colspan="{{ th.colspan }}" >{{ th.text }}</th>
            {% endfor %}
            </tr>
        {% endfor %}
        </thead>
        <tbody>
        {% for row in rows %}
            <tr>
                {% for td in row %}<td>{{ td }}</td>{% endfor %}
            </tr>
        {% endfor %}
        </tbody>
    </table>
</div>
