From 322b21e0d0f4a512a8e5c95f6e9f560f04e94493 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Tue, 28 Oct 2014 19:14:32 -0500 Subject: [PATCH] Updating regexes --- lib/linguist/heuristics.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/linguist/heuristics.rb b/lib/linguist/heuristics.rb index fa49a55b..e8b80524 100644 --- a/lib/linguist/heuristics.rb +++ b/lib/linguist/heuristics.rb @@ -38,11 +38,11 @@ module Linguist # Returns an array of Languages or [] def self.disambiguate_c(data, languages) matches = [] - if (/@\b(interface|class|protocol|property|end|synchronised|selector|implementation)\b/.match(data)) + if (/@(interface|class|protocol|property|end|synchronised|selector|implementation)\b/.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|(i|o|io)stream)>/.match(data) or - /^\s*template\s*/.match(data) || + /^\s*template\s*