(Original issue 816 created by sijk on 2012-10-21T23:28:14.507932+00:00)
Files named CMakeLists.txt are correctly assigned a CMakeLexer if you use get_lexer_for_filename. They are incorrectly assigned a TextLexer if you use guess_lexer_for_filename.
#!python
In [2]: guess_lexer_for_filename('CMakeLists.txt','')
Out[2]: <pygments.lexers.TextLexer>
In [3]: get_lexer_for_filename('CMakeLists.txt')
Out[3]: <pygments.lexers.CMakeLexer>
Given CMakeLists.txt is a more specific name than *.txt it seems to me that both functions should return a CMakeLexer.
(Original issue 816 created by sijk on 2012-10-21T23:28:14.507932+00:00)
Files named CMakeLists.txt are correctly assigned a CMakeLexer if you use
get_lexer_for_filename. They are incorrectly assigned a TextLexer if you useguess_lexer_for_filename.Given
CMakeLists.txtis a more specific name than*.txtit seems to me that both functions should return a CMakeLexer.