From 7337638b72e2a78c8b1cc33302415ef3da370324 Mon Sep 17 00:00:00 2001 From: Benjamin Attal Date: Sun, 1 Jun 2014 01:55:00 -0400 Subject: [PATCH] Change form get_lexer to guess_lexer -- guess_lexer is more accurate. --- bitshift/parser/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitshift/parser/__init__.py b/bitshift/parser/__init__.py index 295d45a..66484a4 100644 --- a/bitshift/parser/__init__.py +++ b/bitshift/parser/__init__.py @@ -38,7 +38,7 @@ def _lang(codelet): try: if codelet.filename: - lex = pgl.get_lexer_for_filename(codelet.filename) + lex = pgl.guess_lexer_for_filename(codelet.filename, codelet.code) else: lex = pgl.guess_lexer(codelet.code) except util.ClassNotFound: