lib/rouge/guessers/glob_mapping.rb in rouge-3.4.1 vs lib/rouge/guessers/glob_mapping.rb in rouge-3.5.0
- old
+ new
@@ -30,10 +30,10 @@
def filter(lexers)
basename = File.basename(filename)
collect_best(lexers) do |lexer|
- score = (@glob_map[lexer.name] || []).map do |pattern|
+ (@glob_map[lexer.name] || []).map do |pattern|
if test_glob(pattern, basename)
# specificity is better the fewer wildcards there are
-pattern.scan(/[*?\[]/).size
end
end.compact.min