Skip to content

Commit

Permalink
Fixes fortune files
Browse files Browse the repository at this point in the history
  • Loading branch information
derphilipp committed May 6, 2024
1 parent 0d0e1e1 commit 1f16919
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/fortune.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 1f16919

Please sign in to comment.