From 1c39893681aaf295fb540a84876304e8e0737065 Mon Sep 17 00:00:00 2001 From: Bernardo Innocenti Date: Mon, 17 Dec 2007 11:53:01 +0100 Subject: [PATCH] Allow [[foo|bar]] with no spaces in between --- geekigeeki.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/geekigeeki.py b/geekigeeki.py index 43b9cc1..d8d984a 100755 --- a/geekigeeki.py +++ b/geekigeeki.py @@ -389,7 +389,7 @@ class PageFormatter: return '%s' % (word, word) def _hurl_repl(self, word): - m = re.compile("\[\[(\S+)(?:\s*\|\s*([^\]]*)|)\]\]").match(word) + m = re.compile("\[\[([^ \t\n\r\f\v\|]+)(?:\s*\|\s*([^\]]+)|)\]\]").match(word) name = m.group(1) descr = m.group(2) or name @@ -511,7 +511,7 @@ class PageFormatter: # Links + r"|(?P\b[a-zA-Z0-9_-]+\.(png|gif|jpg|jpeg|bmp))" + r"|(?P\b(?:[A-Z][a-z]+){2,}\b)" - + r"|(?P\[\[(\S+)(?:\s*\|\s*([^\]]*)|)\]\])" + + r"|(?P\[\[([^ \t\n\r\f\v\|]+)(?:\s*\|\s*([^\]]+)|)\]\])" + r"|(?P(http|https|ftp|mailto)\:[^\s'\"]+\S)" + r"|(?P[-\w._+]+\@[\w.-]+)" -- 2.25.1