class Rouge::Guessers::Filename
def filter(lexers)
In this case, nginx will win because the pattern has no wildcards,
matches `nginx.conf`, and the Conf lexer, which matches `*.conf`.
This helps disambiguate between, e.g. the Nginx lexer, which
equal specificity (i.e. number of wildcards in the pattern).
returns a list of lexers that match the given filename with
def filter(lexers) mapping = {} lexers.each do |lexer| mapping[lexer.name] = lexer.filenames || [] end GlobMapping.new(mapping, @filename).filter(lexers) end