Skip to content

Commit

Permalink
🐛 fix: strip original line end
Browse files Browse the repository at this point in the history
  • Loading branch information
SigureMo committed Oct 13, 2024
1 parent 7d35b80 commit 2f72d7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dochooks/insert_whitespace_between_cn_and_en_char/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def _check_file(file_path: str) -> ReturnCode:
need_format, diagnostics = check_lines(f)
if need_format:
for lineno, line in diagnostics:
print(f"No spaces between EN and CN chars detected at: {file_path}:{lineno}:\t{line}")
print(f"No spaces between EN and CN chars detected at: {file_path}:{lineno}:\t{line.strip()}")
return FAIL if need_format else PASS


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def _format_file(file_path: str) -> ReturnCode:
with open(file_path, "w", encoding="utf8", newline="\n") as f:
f.write(formatted_text)
for lineno, line in diagnostics:
print(f"Add spaces between EN and CN chars in: {file_path}:{lineno}:\t{line}")
print(f"Add spaces between EN and CN chars in: {file_path}:{lineno}:\t{line.strip()}")
return FAIL if need_format else PASS


Expand Down

0 comments on commit 2f72d7c

Please sign in to comment.