only use lexer if one was found
This commit is contained in:
parent
e8f2d75927
commit
ccb0b11ffb
1 changed files with 2 additions and 2 deletions
|
@ -39,8 +39,8 @@ def guess_language(file_name):
|
||||||
return language, None
|
return language, None
|
||||||
|
|
||||||
lexer = smart_guess_lexer(file_name)
|
lexer = smart_guess_lexer(file_name)
|
||||||
|
if lexer:
|
||||||
language = u(lexer.name)
|
language = u(lexer.name)
|
||||||
|
|
||||||
return language, lexer
|
return language, lexer
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue