From: Bernie Innocenti Date: Mon, 2 Jun 2008 06:32:32 +0000 (+0200) Subject: Also accept numbers in WikiWords X-Git-Tag: v3.0~22^2 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=dd0b3b478b3d9fde450ee99bcee8e4b45c7498a8;p=geekigeeki.git Also accept numbers in WikiWords --- diff --git a/geekigeeki.py b/geekigeeki.py index 3b66445..8bb4d36 100755 --- a/geekigeeki.py +++ b/geekigeeki.py @@ -28,7 +28,7 @@ from os import path, environ # Regular expression defining a WikiWord # (but this definition is also assumed in other places) -word_re = re.compile(r"^\b((([A-Z][a-z]+){2,}/)*([A-Z][a-z]+){2,})\b$") +word_re = re.compile(r"^\b((([A-Z][a-z0-9]+){2,}/)*([A-Z][a-z0-9]+){2,})\b$") # FIXME: we accept stuff like foo/../bar and we shouldn't file_re = re.compile(r"^\b([A-Za-z0-9_\-][A-Za-z0-9_\.\-/]*)\b$") img_re = re.compile(r"^.*\.(png|gif|jpg|jpeg)$", re.IGNORECASE)