summaryrefslogtreecommitdiff
path: root/pygments/lexers/asm.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2011-06-18 11:01:02 +0200
committerGeorg Brandl <georg@python.org>2011-06-18 11:01:02 +0200
commit8977c61fb76da0b7efcb414623c1c90d10850dcc (patch)
tree4492c7b31a90db1ec6d0f485796320cfec5bce7c /pygments/lexers/asm.py
parentde5d4cd69afe063e43695bae110c873870b26a6e (diff)
downloadpygments-8977c61fb76da0b7efcb414623c1c90d10850dcc.tar.gz
Improve ASM analyzer (#645).
Diffstat (limited to 'pygments/lexers/asm.py')
-rw-r--r--pygments/lexers/asm.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/pygments/lexers/asm.py b/pygments/lexers/asm.py
index 97b2a39b..a57ea69d 100644
--- a/pygments/lexers/asm.py
+++ b/pygments/lexers/asm.py
@@ -88,7 +88,11 @@ class GasLexer(RegexLexer):
}
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):
"""