Remove leading spaces, makes the index ~100K smaller.

This commit is contained in:
Georg Brandl
2007-08-17 06:25:38 +00:00
parent d0121841a6
commit a826246980

View File

@@ -11,36 +11,34 @@
<hr> <hr>
{% for key, entries in genindexentries %} {% for key, entries in genindexentries %}
<h2 id="{{ key }}">{{ key }}</h2> <h2 id="{{ key }}">{{ key }}</h2>
<table width="100%" class="indextable"><tr><td width="33%" valign="top"> <table width="100%" class="indextable"><tr><td width="33%" valign="top">
<dl> <dl>
{%- set breakat = genindexcounts[loop.index0] // 2 %} {%- set breakat = genindexcounts[loop.index0] // 2 %}
{%- set numcols = 1 %} {%- set numcols = 1 %}
{%- set numitems = 0 %} {%- set numitems = 0 %}
{% for entryname, (links, subitems) in entries %} {% for entryname, (links, subitems) in entries %}
<dt>{%- if links -%} <dt>{%- if links -%}<a href="{{ links[0] }}">{{ entryname }}</a>
<a href="{{ links[0] }}">{{ entryname }}</a> {%- for link in links[1:] %}, <a href="{{ link }}">[Link]</a>{% endfor -%}
{%- for link in links[1:] %}, <a href="{{ link }}">[Link]</a>{% endfor -%} {%- else -%}
{%- else -%} {{ entryname }}
{{ entryname }} {%- endif -%}</dt>
{%- endif -%}</dt> {%- if subitems %}
{%- if subitems %} <dd><dl>
<dd><dl> {%- for subentryname, subentrylinks in subitems %}
{%- for subentryname, subentrylinks in subitems %} <dt><a href="{{ subentrylinks[0] }}">{{ subentryname }}</a>
<dt><a href="{{ subentrylinks[0] }}">{{ subentryname }}</a> {%- for link in subentrylinks[1:] %}, <a href="{{ link }}">[Link]</a>{% endfor -%}
{%- for link in subentrylinks[1:] %}, <a href="{{ link }}">[Link]</a>{% endfor -%} </dt>
</dt> {%- endfor %}
{%- endfor %} </dl></dd>
</dl></dd> {%- endif -%}
{%- endif -%} {%- set numitems = numitems + 1 + len(subitems) -%}
{%- set numitems = numitems + 1 + len(subitems) -%} {%- if numcols < 2 and numitems > breakat -%}
{%- if numcols < 2 and numitems > breakat -%} {%- set numcols = numcols+1 -%}
{%- set numcols = numcols+1 -%} </dl></td><td width="33%" valign="top"><dl>
</dl></td><td width="33%" valign="top"><dl> {%- endif -%}
{%- endif -%} {%- endfor %}
{% endfor %} </dl></td></tr></table>
</dl></td></tr></table> {% endfor %}
{% endfor %}
{% endblock %} {% endblock %}