fix #31 by catching exceptions from
This commit is contained in:
parent
3d26b81901
commit
3ee44d5aba
1 changed files with 6 additions and 1 deletions
|
@ -135,7 +135,12 @@ def guess_lexer_using_modeline(text):
|
|||
|
||||
lexer, accuracy = None, None
|
||||
|
||||
file_type = get_filetype_from_buffer(text)
|
||||
file_type = None
|
||||
try:
|
||||
file_type = get_filetype_from_buffer(text)
|
||||
except:
|
||||
pass
|
||||
|
||||
if file_type is not None:
|
||||
try:
|
||||
lexer = get_lexer_by_name(file_type)
|
||||
|
|
Loading…
Reference in a new issue