From f717244ea693c7882948b4758836e530169a6c11 Mon Sep 17 00:00:00 2001 From: Bernie Innocenti Date: Sat, 11 Apr 2009 15:45:21 +0200 Subject: [PATCH] Fix WordIndex and TitleIndex, improve HTML output --- geekigeeki.py | 3 ++- macros/WordIndex.py | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/geekigeeki.py b/geekigeeki.py index 79f99ef..3eb4c1a 100755 --- a/geekigeeki.py +++ b/geekigeeki.py @@ -287,9 +287,10 @@ def handle_edit(pagename): text = form['savetext'].value pg.send_editor(text) +# Used by macros/WordIndex and macros/TitleIndex def make_index_key(): links = map(lambda ch: '%s' % (ch, ch), 'abcdefghijklmnopqrstuvwxyz') - return '

'+ ' | '.join(links) + '

' + return '

'+ ' | '.join(links) + '

' def page_list(dirname = None, re = word_re): return sorted(filter(re.match, os.listdir(dirname or data_dir))) diff --git a/macros/WordIndex.py b/macros/WordIndex.py index 81cd0f9..818a884 100755 --- a/macros/WordIndex.py +++ b/macros/WordIndex.py @@ -17,15 +17,15 @@ def _macro_WordIndex(argv): for word in all_words: letter = word[0].lower() if letter != last_letter: - s = s + ';

%s

' % (letter, letter) + s += '

%s

' % (letter, letter) last_letter = letter - s = s + '%s' return s -- 2.25.1