summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pygments/lexers/asm.py2
-rw-r--r--tests/test_basic_api.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/pygments/lexers/asm.py b/pygments/lexers/asm.py
index 4740569c..97b2a39b 100644
--- a/pygments/lexers/asm.py
+++ b/pygments/lexers/asm.py
@@ -88,7 +88,7 @@ class GasLexer(RegexLexer):
}
def analyse_text(text):
- return re.match(r'^\.\w+', text, re.M)
+ return bool(re.match(r'^\.\w+', text, re.M))
class ObjdumpLexer(RegexLexer):
"""
diff --git a/tests/test_basic_api.py b/tests/test_basic_api.py
index 1e7dff14..a90d0a83 100644
--- a/tests/test_basic_api.py
+++ b/tests/test_basic_api.py
@@ -42,6 +42,8 @@ def test_lexer_classes():
"%s: %s attribute wrong" % (cls, attr)
result = cls.analyse_text("abc")
assert isinstance(result, float) and 0.0 <= result <= 1.0
+ result = cls.analyse_text(".abc")
+ assert isinstance(result, float) and 0.0 <= result <= 1.0
inst = cls(opt1="val1", opt2="val2")
if issubclass(cls, RegexLexer):