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 = []
|
matches = []
|
||||||
if (/@(interface|class|protocol|synchronised|selector|implementation)/.match(data))
|
if (/@(interface|class|protocol|synchronised|selector|implementation)/.match(data))
|
||||||
matches << Language["Objective-C"]
|
matches << Language["Objective-C"]
|
||||||
end
|
elsif (/^\s*#\s*include <(cstdint|string|vector|map|list|array|bitset|queue|stack|forward_list|unordered_map|unordered_set)>/.match(data) or
|
||||||
if (/^\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))
|
/template\s*</.match(data) or /[^@]class/.match(data))
|
||||||
matches << Language["C++"]
|
matches << Language["C++"]
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user