mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Fixed the failing patten for detecting C++-only headers
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user