Skip to content

Commit ee4d53f

Browse files
committed
fix: do not trim trailing newlines (fixes #27)
1 parent 9f6c4d5 commit ee4d53f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/compute-lines.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ const computeLineInformation = (
136136
// Use diffLines for strings, and diffJson for objects...
137137
if (typeof oldString === 'string' && typeof newString === 'string') {
138138
diffArray = diff.diffLines(
139-
oldString.trimRight(),
140-
newString.trimRight(),
139+
oldString,
140+
newString,
141141
{
142142
newlineIsToken: false,
143143
ignoreWhitespace: false,

0 commit comments

Comments
 (0)