Skip to content

Commit c817ec9

Browse files
Merge pull request #49 from elwynelwyn/16-handle-identical-content
fix: handle identical old/new content
2 parents 9c34ebc + 25bd020 commit c817ec9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/core/src/parse/diff-parse.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,12 +442,12 @@ export class DiffParser {
442442
let linesConsumed = 0;
443443
let previousHunk: DiffHunk | null = null;
444444

445-
do {
445+
while (this.peek()) {
446446
const hunk = this.parseHunk(linesConsumed, hunks.length, previousHunk);
447447
hunks.push(hunk);
448448
previousHunk = hunk;
449449
linesConsumed += hunk.lines.length;
450-
} while (this.peek());
450+
}
451451

452452
const contents = this.text
453453
.substring(headerEnd + 1, this.le)

0 commit comments

Comments
 (0)