From ee90c3751cc085f97a6b2e9402ac9e94fd89d423 Mon Sep 17 00:00:00 2001 From: Grygoriy Fuchedzhy Date: Thu, 20 Oct 2011 17:42:35 +0300 Subject: [PATCH] textlinks plugin: do nothing if resource doesn't use template --- hyde/ext/plugins/textlinks.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hyde/ext/plugins/textlinks.py b/hyde/ext/plugins/textlinks.py index b6f8261..2555a74 100644 --- a/hyde/ext/plugins/textlinks.py +++ b/hyde/ext/plugins/textlinks.py @@ -22,6 +22,8 @@ class TextlinksPlugin(Plugin): with {{ media_url('/abc/def') }} or equivalent. """ + if not resource.uses_template: + return text content_link = re.compile('\[\[([^\]^!][^\]]*)\]\]', re.UNICODE|re.MULTILINE) media_link = re.compile('\[\[\!\!([^\]]*)\]\]', re.UNICODE|re.MULTILINE) def replace_content(match):