From: Bernie Innocenti
Date: Fri, 4 May 2012 02:04:31 +0000 (-0400)
Subject: Move permalinks after titles
X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=799b890d2a48b494346a1334393fb7c0198b446d;p=geekigeeki.git
Move permalinks after titles
---
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):