Only do that on non-markdown

master
Nick Sergeant 2012-07-23 10:09:26 -04:00
parent 05c64e1c0c
commit 9f0abed499
1 changed files with 3 additions and 2 deletions

View File

@ -34,8 +34,9 @@ def detail(request, username, snipt_slug):
snipt = get_object_or_404(Snipt, user__username=username, slug=snipt_slug)
user = snipt.user
if 'linenos' not in snipt.stylized:
snipt.save()
if snipt.lexer != 'markdown':
if 'linenos' not in snipt.stylized:
snipt.save()
if user != request.user:
if not snipt.public: