Issue #418 open

get_lexer_for_filename get wrong lexer when filename is *.S

Anonymous created an issue

the file .S appear in both lexers: 'GasLexer': ('pygments.lexers.asm', 'GAS', ('gas',), ('.s', '.S'), ('text/x-gas',)), and 'SLexer': ('pygments.lexers.math', 'S', ('splus', 's', 'r'), ('.S', '*.R'), ('text/S-plus', 'text/S', 'text/R')), when just use get_lexer_for_filename("asm.S"), it's return pygments.lexers.math, cann't retruen pygments.lexers.asm

Reported by guest

Comments (5)

  1. gbrandl

    A general solution here is not possible, if we just use the filename. Tim is working on something that guesses based on contents, too.

  2. Log in to comment