summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMatthäus G. Chajdas <dev@anteru.net>2022-12-11 18:50:49 +0100
committerMatthäus G. Chajdas <dev@anteru.net>2022-12-11 18:50:49 +0100
commit7429535a88b0ca5d0594f2dee9eece848172c2d2 (patch)
tree9bab666e85ff1b579daefa18ee99cfb98e820aa5 /scripts
parent61c07359aee04b4dd31db42fe93ac0d51010c020 (diff)
downloadpygments-git-7429535a88b0ca5d0594f2dee9eece848172c2d2.tar.gz
Allow whitespace in comments.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/check_whitespace_token.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/check_whitespace_token.py b/scripts/check_whitespace_token.py
index cc3d1aa6..f5d09703 100644
--- a/scripts/check_whitespace_token.py
+++ b/scripts/check_whitespace_token.py
@@ -24,6 +24,11 @@ def check_file(path):
if 'Literal' in token:
continue
+ # If whitespace is part of a comment, we accept that as well,
+ # as comments may be similarly highlighted to literals
+ if 'Comment' in token:
+ continue
+
if 'Whitespace' in token:
continue