Classify builds, pkgproj, resx and sfproj as XML (#2954)

* Classify builds, pkgproj, resx and sfproj as XML

* Disambiguate .builds for XML and Text
This commit is contained in:
Peter Jas
2016-04-27 20:11:07 +03:00
committed by Arfon Smith
parent 5c655e3b20
commit d342aa4841
6 changed files with 159 additions and 0 deletions

View File

@@ -86,6 +86,14 @@ module Linguist
end
end
disambiguate ".builds" do |data|
if /^(\s*)(<Project|<Import|<Property|<?xml|xmlns)/i.match(data)
Language["XML"]
else
Language["Text"]
end
end
disambiguate ".ch" do |data|
if /^\s*#\s*(if|ifdef|ifndef|define|command|xcommand|translate|xtranslate|include|pragma|undef)\b/i.match(data)
Language["xBase"]