summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMatthäus G. Chajdas <dev@anteru.net>2023-03-05 17:37:08 +0100
committerMatthäus G. Chajdas <dev@anteru.net>2023-03-05 17:37:08 +0100
commite61ffd96840c8a04b0556746fcfe8d7704ef6780 (patch)
tree41998b9b94be3404ad7dd2174c46ff0a948751fa /scripts
parent7a3d19c6d17ddd7502fd43fe231b9e5bc6884313 (diff)
downloadpygments-git-e61ffd96840c8a04b0556746fcfe8d7704ef6780.tar.gz
Improve the whitespace checker.
Check both ways now: If a token should be whitespace, but also if a token was incorrectly marked as whitespace.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/check_whitespace_token.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/check_whitespace_token.py b/scripts/check_whitespace_token.py
index ffa1e8d7..507875c7 100644
--- a/scripts/check_whitespace_token.py
+++ b/scripts/check_whitespace_token.py
@@ -35,6 +35,10 @@ def check_file(path):
print(f'{path}:{linenumber}')
return False
+ if 'Whitespace' in token and value != '':
+ print(f'{path}:{linenumber} - '
+ 'Incorrectly marked as whitespace')
+ return False
return True