Skip to content
Permalink
Browse files

Use raw string for regex

Prevents warnings being emitted with recent python versions.
  • Loading branch information...
llimeht authored and NeilFraser committed Jun 30, 2019
1 parent a6367d7 commit ffe7c7be61a0084ac79632f12811bb6dd7ace35c
Showing with 1 addition and 1 deletion.
  1. +1 −1 python3/diff_match_patch.py
@@ -1804,7 +1804,7 @@ def patch_fromText(self, textline):
return patches
text = textline.split('\n')
while len(text) != 0:
m = re.match("^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$", text[0])
m = re.match(r"^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$", text[0])
if not m:
raise ValueError("Invalid patch string: " + text[0])
patch = patch_obj()

0 comments on commit ffe7c7b

Please sign in to comment.
You can’t perform that action at this time.