summaryrefslogtreecommitdiff
path: root/pygments
diff options
context:
space:
mode:
authorTim Hatch <tim@timhatch.com>2018-12-05 05:12:37 +0000
committerTim Hatch <tim@timhatch.com>2018-12-05 05:12:37 +0000
commitbe52094e14ffaba6fee08f7e24712c4f78d56815 (patch)
treed97c3334b7bf50650ca36d5f7c5a0970fde1cec6 /pygments
parentcd850106ed356cd56c2bf19e0eebd75c42780556 (diff)
parenta1ae0fb71c07a83c3e07356ef22d249a7f965dc8 (diff)
downloadpygments-be52094e14ffaba6fee08f7e24712c4f78d56815.tar.gz
Merged in wentasah/pygments-main (pull request #784)
Fix handling of end-of-line comments in asm lexer
Diffstat (limited to 'pygments')
-rw-r--r--pygments/lexers/asm.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/pygments/lexers/asm.py b/pygments/lexers/asm.py
index 9e854581..0a40e641 100644
--- a/pygments/lexers/asm.py
+++ b/pygments/lexers/asm.py
@@ -53,6 +53,7 @@ class GasLexer(RegexLexer):
('@' + identifier, Name.Attribute),
(number, Number.Integer),
(r'[\r\n]+', Text, '#pop'),
+ (r'[;#].*?\n', Comment, '#pop'),
include('punctuation'),
include('whitespace')
@@ -76,6 +77,7 @@ class GasLexer(RegexLexer):
('$'+number, Number.Integer),
(r"$'(.|\\')'", String.Char),
(r'[\r\n]+', Text, '#pop'),
+ (r'[;#].*?\n', Comment, '#pop'),
include('punctuation'),
include('whitespace')