Open pombredanne opened 3 years ago
The constraints around guess_lexer
solely on contents need a complete rewrite; for speed it does not actually even try to tokenize the source, and although it can return a float (that is then ranked) there is no real balancing among the lexers written by different people.
I would suggest lowercasing before get_lexer_for_filename as a very reasonable workaround.
Hello I am new to this community Can I work on this issue?
See https://github.com/pygments/pygments/issues/1563
With the attached file (to rename to a
.JAVA
UPPERCASE extension) the lexer is guessed incorrectly as Python. See Logger.JAVA.txtWhen the extension is lowercased to '.java`, the lexer is guessed OK from the filename. In all cases, the content-based guess is not correct