Show More
@@ -362,10 +362,11 b' class FileNode(Node):' | |||||
362 | Returns pygment's lexer class. Would try to guess lexer taking file's |
|
362 | Returns pygment's lexer class. Would try to guess lexer taking file's | |
363 | content, name and mimetype. |
|
363 | content, name and mimetype. | |
364 | """ |
|
364 | """ | |
|
365 | ||||
365 | try: |
|
366 | try: | |
366 | lexer = lexers.guess_lexer_for_filename(self.name, self.content) |
|
367 | lexer = lexers.guess_lexer_for_filename(self.name, self.content, stripnl=False) | |
367 | except lexers.ClassNotFound: |
|
368 | except lexers.ClassNotFound: | |
368 | lexer = lexers.TextLexer() |
|
369 | lexer = lexers.TextLexer(stripnl=False) | |
369 | # returns first alias |
|
370 | # returns first alias | |
370 | return lexer |
|
371 | return lexer | |
371 |
|
372 |
General Comments 0
You need to be logged in to leave comments.
Login now