From 98ce48c0043fa3fc11a5407b98c9fd0aa2ab53d3 Mon Sep 17 00:00:00 2001 From: Bernie Innocenti Date: Mon, 2 Jun 2008 08:36:22 +0200 Subject: [PATCH] Simplify hurl regex --- geekigeeki.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/geekigeeki.py b/geekigeeki.py index 3b66445..41345e6 100755 --- a/geekigeeki.py +++ b/geekigeeki.py @@ -506,13 +506,14 @@ 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\[\[([^ \t\n\r\f\v\|]+)(?:\s*\|\s*([^\]]+)|)\]\])" + + r"|(?P\[\[([^ \s\|]+)(?:\s*\|\s*([^\]]+)|)\]\])" + r"|(?P(http|https|ftp|mailto)\:[^\s'\"]+\S)" + r"|(?P[-\w._+]+\@[\w.-]+)" # Lists, divs, spans + r"|(?P
  • ^\s+[\*#] +)" + r"|(?P
    \{\{\{|\s*\}\}\})"
    +            + r"|(?P\{\{([^\s\|]+)(?:\s*\|\s*([^\]]+)|)\}\})"
     
                 # Tables
                 + r"|(?P^\s*\|\|(=|)\s*)"
    -- 
    2.25.1