Commits

Georg Brandl committed 027b34c

Improve ASM analyzer (#645).

  • Participants
  • Parent commits 66395f6

Comments (0)

Files changed (1)

File pygments/lexers/asm.py

     }
 
     def analyse_text(text):
-        return bool(re.match(r'^\.\w+', text, re.M))
+        if re.match(r'^\.(text|data|section)', text, re.M):
+            return True
+        elif re.match(r'^\.\w+', text, re.M):
+            return 0.1
+
 
 class ObjdumpLexer(RegexLexer):
     """