# File lib/rouge/guessers/glob_mapping.rb, line 27 def filter(lexers) basename = File.basename(filename) collect_best(lexers) do |lexer| score = (@glob_map[lexer.name] || []).map do |pattern| if test_pattern(pattern, basename) # specificity is better the fewer wildcards there are -pattern.scan(/[*?\[]/).size end end.compact.min end end