mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-12-08 12:28:47 +00:00
Merge pull request #933 from pchaigno/pro
Support of the .pro file extension for Prolog.
This commit is contained in:
@@ -19,6 +19,9 @@ module Linguist
|
||||
if languages.all? { |l| ["ECL", "Prolog"].include?(l) }
|
||||
result = disambiguate_ecl(data, languages)
|
||||
end
|
||||
if languages.all? { |l| ["IDL", "Prolog"].include?(l) }
|
||||
result = disambiguate_pro(data, languages)
|
||||
end
|
||||
if languages.all? { |l| ["Common Lisp", "OpenCL"].include?(l) }
|
||||
result = disambiguate_cl(data, languages)
|
||||
end
|
||||
@@ -51,6 +54,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>"))
|
||||
|
||||
@@ -1820,6 +1820,7 @@ Prolog:
|
||||
extensions:
|
||||
- .pl
|
||||
- .ecl
|
||||
- .pro
|
||||
- .prolog
|
||||
|
||||
Propeller Spin:
|
||||
|
||||
Reference in New Issue
Block a user