Skip to content

Commit

Permalink
fix: fixed diff problem in split mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Shimada666 committed Aug 15, 2023
1 parent 317ca9d commit 26871d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function diffLines(prev: string, current: string) {
dmp.diff_charsToLines_(diffs, lineArray)
return diffs.map((x) => {
const [type, text] = x
const count = text.trim().split('\n').length
const count = text.replace(/\n$/, '').split('\n').length
const change: Diff.Change = {
count,
value: text,
Expand Down

0 comments on commit 26871d2

Please sign in to comment.