Skip to content

Commit

Permalink
Prevent amalgamate.py from adding trailing whitespace
Browse files Browse the repository at this point in the history
When adding the license text, only add leading whitespace to non-empty
lines, otherwise it becomes trailing whitespace.
  • Loading branch information
jwakely committed Oct 24, 2024
1 parent 9ab3525 commit a60ef3b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion script/amalgamate.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@

text = ''
for line in lines:
text += '// ' + line.strip() + '\n'
line = line.strip()
if len(line):
line = ' ' + line
text += '//' + line + '\n'
processed_files[filename] = text

# code
Expand Down

0 comments on commit a60ef3b

Please sign in to comment.