Skip to content

Commit

Permalink
Fixed EOF issue by appending newline on save and popping newline on load
Browse files Browse the repository at this point in the history
  • Loading branch information
sloumdrone committed Dec 29, 2018
1 parent 3e88cf3 commit 2c2551d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions chalk
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ def chalk(path):
if os.path.exists(valid_path):
with open(valid_path,'r') as f:
content = f.read().split('\n')
if content[-1] == '':
content.pop()

print('\n Chalk 0.8 by sloum')
print('\n{} Writing:{} {}{}'.format(c.yellow, c.white, fn, c.end))
Expand Down

0 comments on commit 2c2551d

Please sign in to comment.