jp (blog): fixed syntax detection when extension is .txt

This commit is contained in:
Goffi 2016-06-24 22:32:58 +02:00
commit fe8187a413

View file

@ -147,7 +147,7 @@ class BlogCommon(object):
ext = os.path.splitext(path)[1][1:] # we get extension without the '.'
if ext:
for k,v in SYNTAX_EXT.iteritems():
if ext == v:
if k and ext == v:
return k
# if not found, we use current syntax