Browse Source

Merge pull request #96 from gfuchedzhy/hyde

---

Sometimes javascript contains something like O=[[O,N]]; which transforms into O={{ content_url(O,N) }};. This patch allows to turn off textlinks plugin by specifying "uses_template: false" in meta.
main
Lakshmi Vyasarajan 13 years ago
parent
commit
5612380153
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      hyde/ext/plugins/textlinks.py

+ 2
- 0
hyde/ext/plugins/textlinks.py View File

@@ -22,6 +22,8 @@ class TextlinksPlugin(Plugin):
with with
{{ media_url('/abc/def') }} or equivalent. {{ media_url('/abc/def') }} or equivalent.
""" """
if not resource.uses_template:
return text
content_link = re.compile('\[\[([^\]^!][^\]]*)\]\]', re.UNICODE|re.MULTILINE) content_link = re.compile('\[\[([^\]^!][^\]]*)\]\]', re.UNICODE|re.MULTILINE)
media_link = re.compile('\[\[\!\!([^\]]*)\]\]', re.UNICODE|re.MULTILINE) media_link = re.compile('\[\[\!\!([^\]]*)\]\]', re.UNICODE|re.MULTILINE)
def replace_content(match): def replace_content(match):


Loading…
Cancel
Save