Fixed the failing patten for detecting C++-only headers

This commit is contained in:
DX-MON
2014-04-02 17:57:58 +01:00
parent dfba2a31a5
commit cb10c53dee

View File

@@ -39,8 +39,7 @@ module Linguist
matches = []
if (/@(interface|class|protocol|synchronised|selector|implementation)/.match(data))
matches << Language["Objective-C"]
end
if (/^\s*#\s*include <(cstdint|string|vector|map|list|array|bitset|queue|stack|forward_list|unordered_map|unordered_set)>$/.match(data) or
elsif (/^\s*#\s*include <(cstdint|string|vector|map|list|array|bitset|queue|stack|forward_list|unordered_map|unordered_set)>/.match(data) or
/template\s*</.match(data) or /[^@]class/.match(data))
matches << Language["C++"]
end