diff options
author | Georg Brandl <georg@python.org> | 2011-09-22 13:16:18 +0200 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2011-09-22 13:16:18 +0200 |
commit | 8c68cf5c445e6629d6c123668a23829d683e9ecd (patch) | |
tree | bd79e1a6f5c43cf31418d93e9217faa3508c34c8 /pygments/lexers/asm.py | |
parent | 3271b375f38b1baeda54eb4809ec9404c34b01d4 (diff) | |
parent | 12f4389a72507ea123dba144b2a48bfb4e73793b (diff) | |
download | pygments-8c68cf5c445e6629d6c123668a23829d683e9ecd.tar.gz |
Merged in dvarrazzo/pygments-postgres (pull request #19)
Diffstat (limited to 'pygments/lexers/asm.py')
-rw-r--r-- | pygments/lexers/asm.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pygments/lexers/asm.py b/pygments/lexers/asm.py index 4740569c..82933bc8 100644 --- a/pygments/lexers/asm.py +++ b/pygments/lexers/asm.py @@ -5,7 +5,7 @@ Lexers for assembly languages. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -88,7 +88,11 @@ class GasLexer(RegexLexer): } def analyse_text(text): - return 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): """ |