From eaeb9c11c3a52c9bee4053d72751aeae6059f9a5 Mon Sep 17 00:00:00 2001 From: Arun SAG Date: Thu, 13 Oct 2011 22:30:49 +0530 Subject: Fix: regex failed to match - Autolinking keyterms: uncleaned regex included special characters like \r \n. This caused matches to fail - Add: strip() to the regex before compiling them into regex object --- askbot/utils/markup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/askbot/utils/markup.py b/askbot/utils/markup.py index 60bde9a0..3ebea3e4 100644 --- a/askbot/utils/markup.py +++ b/askbot/utils/markup.py @@ -37,7 +37,7 @@ def get_parser(): for item in pairs: LINK_PATTERNS.append( ( - re.compile(item[0]), + re.compile(item[0].strip()), item[1].strip() ) ) -- cgit v1.2.3-1-g7c22