Skip to content

Commit 92e47b8

Browse files
committed
Fix filename parsing in clang-format-diff.py for paths with spaces
1 parent 81499ed commit 92e47b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/tools/clang-format/clang-format-diff.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def main():
102102
filename = None
103103
lines_by_file = {}
104104
for line in sys.stdin:
105-
match = re.search(r"^\+\+\+\ (.*?/){%s}(\S*)" % args.p, line)
105+
match = re.search(r"^\+\+\+\ (.*?/){%s}(.+)" % args.p, line.rstrip())
106106
if match:
107107
filename = match.group(2)
108108
if filename is None:

0 commit comments

Comments
 (0)