lib/linguist/heuristics.rb in github-linguist-4.5.11 vs lib/linguist/heuristics.rb in github-linguist-4.5.13

- old
+ new

@@ -54,11 +54,11 @@ @heuristic = heuristic end # Internal: Check if this heuristic matches the candidate languages. def matches?(filename) - @extensions.any? { |ext| filename.end_with?(ext) } + @extensions.any? { |ext| filename.downcase.end_with?(ext) } end # Internal: Perform the heuristic def call(data) @heuristic.call(data) @@ -349,10 +349,10 @@ if /^\s*#\s*(if|ifdef|ifndef|define|command|xcommand|translate|xtranslate|include|pragma|undef)\b/i.match(data) Language["xBase"] end end - disambiguate ".r", ".R" do |data| + disambiguate ".r" do |data| if /\bRebol\b/i.match(data) Language["Rebol"] elsif data.include?("<-") Language["R"] end