From cb10c53deeadcbff55aad0ba7e339a00bc4625d4 Mon Sep 17 00:00:00 2001 From: DX-MON Date: Wed, 2 Apr 2014 17:57:58 +0100 Subject: [PATCH] Fixed the failing patten for detecting C++-only headers --- lib/linguist/heuristics.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/linguist/heuristics.rb b/lib/linguist/heuristics.rb index 94965eaf..f4303c88 100644 --- a/lib/linguist/heuristics.rb +++ b/lib/linguist/heuristics.rb @@ -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*