diff options
| author | georg.brandl <devnull@localhost> | 2007-08-17 06:25:38 +0000 |
|---|---|---|
| committer | georg.brandl <devnull@localhost> | 2007-08-17 06:25:38 +0000 |
| commit | a480ab7cada2e770d46325cb2f0d74f2f8cf4d58 (patch) | |
| tree | 638d4df68b9507b537912efca5fe8b83da5e9022 /sphinx | |
| parent | 97c8cd7e665822780aba5bbd4998f5a4bc7240f0 (diff) | |
| download | sphinx-a480ab7cada2e770d46325cb2f0d74f2f8cf4d58.tar.gz | |
Remove leading spaces, makes the index ~100K smaller.
Diffstat (limited to 'sphinx')
| -rw-r--r-- | sphinx/templates/genindex.html | 60 |
1 files changed, 29 insertions, 31 deletions
diff --git a/sphinx/templates/genindex.html b/sphinx/templates/genindex.html index a97c5485..966c3f0c 100644 --- a/sphinx/templates/genindex.html +++ b/sphinx/templates/genindex.html @@ -11,36 +11,34 @@ <hr> {% for key, entries in genindexentries %} - <h2 id="{{ key }}">{{ key }}</h2> - <table width="100%" class="indextable"><tr><td width="33%" valign="top"> - <dl> - {%- set breakat = genindexcounts[loop.index0] // 2 %} - {%- set numcols = 1 %} - {%- set numitems = 0 %} - {% for entryname, (links, subitems) in entries %} - <dt>{%- if links -%} - <a href="{{ links[0] }}">{{ entryname }}</a> - {%- for link in links[1:] %}, <a href="{{ link }}">[Link]</a>{% endfor -%} - {%- else -%} - {{ entryname }} - {%- endif -%}</dt> - {%- if subitems %} - <dd><dl> - {%- for subentryname, subentrylinks in subitems %} - <dt><a href="{{ subentrylinks[0] }}">{{ subentryname }}</a> - {%- for link in subentrylinks[1:] %}, <a href="{{ link }}">[Link]</a>{% endfor -%} - </dt> - {%- endfor %} - </dl></dd> - {%- endif -%} - {%- set numitems = numitems + 1 + len(subitems) -%} - {%- if numcols < 2 and numitems > breakat -%} - {%- set numcols = numcols+1 -%} - </dl></td><td width="33%" valign="top"><dl> - {%- endif -%} - {% endfor %} - </dl></td></tr></table> - - {% endfor %} +<h2 id="{{ key }}">{{ key }}</h2> +<table width="100%" class="indextable"><tr><td width="33%" valign="top"> +<dl> +{%- set breakat = genindexcounts[loop.index0] // 2 %} +{%- set numcols = 1 %} +{%- set numitems = 0 %} +{% for entryname, (links, subitems) in entries %} +<dt>{%- if links -%}<a href="{{ links[0] }}">{{ entryname }}</a> + {%- for link in links[1:] %}, <a href="{{ link }}">[Link]</a>{% endfor -%} + {%- else -%} +{{ entryname }} + {%- endif -%}</dt> + {%- if subitems %} + <dd><dl> + {%- for subentryname, subentrylinks in subitems %} + <dt><a href="{{ subentrylinks[0] }}">{{ subentryname }}</a> + {%- for link in subentrylinks[1:] %}, <a href="{{ link }}">[Link]</a>{% endfor -%} + </dt> + {%- endfor %} + </dl></dd> + {%- endif -%} +{%- set numitems = numitems + 1 + len(subitems) -%} +{%- if numcols < 2 and numitems > breakat -%} +{%- set numcols = numcols+1 -%} +</dl></td><td width="33%" valign="top"><dl> +{%- endif -%} +{%- endfor %} +</dl></td></tr></table> +{% endfor %} {% endblock %} |
