From 1f16919d0ab5a6b7d99bba65e52106ba683ff103 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Wei=C3=9Fmann?= Date: Mon, 6 May 2024 10:40:25 +0200 Subject: [PATCH] Fixes fortune files --- scripts/fortune.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/fortune.py b/scripts/fortune.py index a24b8a0..d10923f 100644 --- a/scripts/fortune.py +++ b/scripts/fortune.py @@ -14,8 +14,8 @@ def process_file(input_file, output_file): # Remove leading '- ' if present if line.startswith("- "): line = line[2:] - # Write '%\n' followed by the modified line - file.write(f"%\n{line}") + # Write the line, followed by a newline - and a % in an otherwise empty line + file.write(f"{line}%\n") except FileNotFoundError: print(f"Error: The file '{input_file}' does not exist.") except Exception as e: