Skip to content

Commit 461c7af

Browse files
authored
Normalize newlines to '\n' when generating templates (#853)
1 parent 6aacfe2 commit 461c7af

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

generate_templates.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ def encode_file_to_base64(file_path):
88
"""Encode the content of a file to a Base64 string."""
99
with open(file_path, 'rb') as file:
1010
file_content = file.read()
11+
file_content = file_content.replace(b'\r\n', b'\n').replace(b'\r', b'\n')
1112
encoded_content = base64.b64encode(file_content).decode('utf-8')
1213
return encoded_content
1314

0 commit comments

Comments
 (0)