From 3cebb905becc61868f9431c2cf8939d1f1cd198e Mon Sep 17 00:00:00 2001
From: Bernie Innocenti
Date: Sat, 2 May 2009 11:44:07 +0200
Subject: [PATCH] Fix editing and humanized links
---
geekigeeki.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/geekigeeki.py b/geekigeeki.py
index a36eced..afaebef 100755
--- a/geekigeeki.py
+++ b/geekigeeki.py
@@ -80,7 +80,7 @@ def permalink(s):
return re.sub(' ', '-', re.sub('[^a-z0-9_ ]', '', s.lower()).strip())
def humanlink(s):
- return re.sub(r'([^:/\.]+)(?:\.[^/:]+|)$', r'\1', s.replace('_', ' '))
+ return re.sub(r'(?:.*[/:]|)([^:/\.]+)(?:\.[^/:]+|)$', r'\1', s.replace('_', ' '))
# Split arg lists like "blah| blah blah| width=100 | align = center",
# return a list containing anonymous arguments and a map containing the named arguments
@@ -742,7 +742,7 @@ class Page:
+ ' from ' + cgi.escape(get_hostname(remote_host()))
+ '
'))
print('