Skip to content

Commit ec2c4b0

Browse files
committed
Read editor input as string
Using File.read_lines resulted in extra newlines being added to log input.
1 parent 3b9c5e8 commit ec2c4b0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/dev_journal/cli.cr

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ module DevJournal
6161
system(editor, [tempfile.path])
6262

6363
if $?.normal_exit?
64-
body = File.read_lines(tempfile.path)
65-
add_entry(body.join("\n"))
64+
body = File.read(tempfile.path)
65+
add_entry(body)
6666
end
6767

6868
tempfile.unlink

0 commit comments

Comments
 (0)