diff options
author | Georg Brandl <georg@python.org> | 2011-06-18 11:01:02 +0200 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2011-06-18 11:01:02 +0200 |
commit | 8977c61fb76da0b7efcb414623c1c90d10850dcc (patch) | |
tree | 4492c7b31a90db1ec6d0f485796320cfec5bce7c /pygments/lexers/asm.py | |
parent | de5d4cd69afe063e43695bae110c873870b26a6e (diff) | |
download | pygments-8977c61fb76da0b7efcb414623c1c90d10850dcc.tar.gz |
Improve ASM analyzer (#645).
Diffstat (limited to 'pygments/lexers/asm.py')
-rw-r--r-- | pygments/lexers/asm.py | 6 |
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): """ |