Merge pull request #864 from OverKit/master

check letter % after removing spaces or tabs in the left
This commit is contained in:
binary-husky 2023-06-12 15:21:35 +08:00 committed by GitHub
commit 12d66777cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -127,7 +127,7 @@ def rm_comments(main_file):
new_file_remove_comment_lines = []
for l in main_file.splitlines():
# 删除整行的空注释
if l.startswith("%") or (l.startswith(" ") and l.lstrip().startswith("%")):
if l.lstrip().startswith("%"):
pass
else:
new_file_remove_comment_lines.append(l)