Commits

Georg Brandl committed 6f83c1a

Closes #696: better analyse_text for objective-c lexer.

Comments (0)

Files changed (1)

pygments/lexers/compiled.py

     }
 
     def analyse_text(text):
-        if '@"' in text: # strings
+        if '@import' in text or '@interface' in text or \
+            '@implementation' in text:
             return True
-        if re.match(r'\[[a-zA-Z0-9.]:', text): # message
+        elif '@"' in text: # strings
+            return True
+        elif re.match(r'\[[a-zA-Z0-9.]:', text): # message
             return True
         return False