summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArun SAG <sagarun@gmail.com>2011-10-13 22:30:49 +0530
committerArun SAG <sagarun@gmail.com>2011-10-13 22:30:49 +0530
commiteaeb9c11c3a52c9bee4053d72751aeae6059f9a5 (patch)
treeb57375e0190705d1315b4198cde5cc4575f0abd0
parent0981786d90d34f35ef52f0a3eb5adc60533b7e76 (diff)
downloadaskbot-eaeb9c11c3a52c9bee4053d72751aeae6059f9a5.tar.gz
askbot-eaeb9c11c3a52c9bee4053d72751aeae6059f9a5.tar.bz2
askbot-eaeb9c11c3a52c9bee4053d72751aeae6059f9a5.zip
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
-rw-r--r--askbot/utils/markup.py2
1 files changed, 1 insertions, 1 deletions
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()
)
)