From bcdfee823247b1341dd567f7d70484455f4d688a Mon Sep 17 00:00:00 2001 From: Nick Sergeant Date: Mon, 4 Jun 2012 18:28:42 -0400 Subject: [PATCH] Modify regex to only grab 32 char keys --- snipts/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snipts/models.py b/snipts/models.py index a845796..0a33824 100644 --- a/snipts/models.py +++ b/snipts/models.py @@ -52,7 +52,7 @@ class Snipt(models.Model): if self.lexer == 'markdown': self.stylized = markdown(self.code, 'default') - for match in re.findall('\[\[(.*)\]\]', self.stylized): + for match in re.findall('\[\[(\w{32})\]\]', self.stylized): self.stylized = self.stylized.replace('[[' + str(match) + ']]', '
'.format(match, match)) else: