mirror of
https://github.com/KevinMidboe/linguist.git
synced 2026-01-23 09:45:57 +00:00
Support of the .pro file extension for Prolog.
This commit is contained in:
@@ -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>"))
|
||||
|
||||
@@ -1325,6 +1325,7 @@ Prolog:
|
||||
extensions:
|
||||
- .ecl
|
||||
- .pl
|
||||
- .pro
|
||||
|
||||
Protocol Buffer:
|
||||
type: markup
|
||||
|
||||
Reference in New Issue
Block a user