Skip to content

Commit dadb500

Browse files
authored
fix: incorrect regular expression matching diffcmd (#62)
1 parent f274445 commit dadb500

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/whatthepatch/patch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# .+? was previously [^:\t\n\r\f\v]+
2020

2121
# general diff regex
22-
diffcmd_header = re.compile("^diff.* (.+) (.+)$")
22+
diffcmd_header = re.compile("^diff .* (.+) (.+)$")
2323
unified_header_index = re.compile("^Index: (.+)$")
2424
unified_header_old_line = re.compile(r"^--- " + file_timestamp_str + "$")
2525
unified_header_new_line = re.compile(r"^\+\+\+ " + file_timestamp_str + "$")

0 commit comments

Comments
 (0)