Support of the .pro file extension for Prolog.

This commit is contained in:
Paul Chaignon
2014-02-10 18:10:20 +01:00
parent a1eab2a439
commit 2beb450df6
4 changed files with 94 additions and 0 deletions

View File

@@ -22,6 +22,9 @@ module Linguist
if languages.all? { |l| ["ECL", "Prolog"].include?(l) }
disambiguate_ecl(data, languages)
end
if languages.all? { |l| ["IDL", "Prolog"].include?(l) }
disambiguate_pro(data, languages)
end
if languages.all? { |l| ["TypeScript", "XML"].include?(l) }
disambiguate_ts(data, languages)
end
@@ -56,6 +59,16 @@ module Linguist
matches
end
def self.disambiguate_pro(data, languages)
matches = []
if (data.include?(":-"))
matches << Language["Prolog"]
else
matches << Language["IDL"]
end
matches
end
def self.disambiguate_ts(data, languages)
matches = []
if (data.include?("</translation>"))

View File

@@ -1325,6 +1325,7 @@ Prolog:
extensions:
- .ecl
- .pl
- .pro
Protocol Buffer:
type: markup