diff options
author | Matthäus G. Chajdas <dev@anteru.net> | 2023-03-05 17:37:08 +0100 |
---|---|---|
committer | Matthäus G. Chajdas <dev@anteru.net> | 2023-03-05 17:37:08 +0100 |
commit | e61ffd96840c8a04b0556746fcfe8d7704ef6780 (patch) | |
tree | 41998b9b94be3404ad7dd2174c46ff0a948751fa /scripts | |
parent | 7a3d19c6d17ddd7502fd43fe231b9e5bc6884313 (diff) | |
download | pygments-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.py | 4 |
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 |