Skip to content

Commit b52445e

Browse files
committed
Fix multi line diff bug
1 parent 51c99da commit b52445e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "difflib-parser"
7-
version = "1.2.1"
7+
version = "1.2.2"
88
authors = [{ name = "Jiahao, Woo", email = "woojiahao1234@gmail.com" }]
99
description = "Lightweight Python package for parsing Python difflib's diff results"
1010
readme = "README.md"

src/difflib_parser/difflib_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ def __init__(self, left_text: List[str], right_text: List[str]):
3939
self.__line_no = 0
4040

4141
def iter_diffs(self) -> Iterator[Diff]:
42-
current_line = self.__diff[self.__line_no]
4342
while self.__line_no < len(self.__diff):
43+
current_line = self.__diff[self.__line_no]
4444
diff_line = DiffLine.parse(current_line)
4545
if diff_line.line is None:
4646
self.__line_no += 1

0 commit comments

Comments
 (0)