From 799b890d2a48b494346a1334393fb7c0198b446d Mon Sep 17 00:00:00 2001 From: Bernie Innocenti Date: Thu, 3 May 2012 22:04:31 -0400 Subject: [PATCH] Move permalinks after titles --- geekigeeki.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/geekigeeki.py b/geekigeeki.py index 341978e..9d443fc 100755 --- a/geekigeeki.py +++ b/geekigeeki.py @@ -126,7 +126,7 @@ def send_guru(msg_text, msg_type): print('' \ % relative_url('sys/GuruMeditation.js')) -def send_httperror(status="403 Not Found", query="", trace=False): +def send_httperror(status="404 Not Found", query="", trace=False): print("Status: %s" % status) msg_text = "%s: on query '%s'" % (status, query) if trace: @@ -306,13 +306,13 @@ class WikiFormatter: return '—' def _tit_repl(self, word): + link = permalink(self.line) if self.h_level: - result = '

\n' % self.h_level + result = '¶

\n' % (link, self.h_level) self.h_level = 0 else: self.h_level = len(word) - 1 - link = permalink(self.line) - result = '\n

¶ ' % (self.h_level, link, link) + result = '\n

' % (self.h_level, link) return result def _br_repl(self, word): -- 2.25.1