-
Sublime Text version:
-
How did you install this package?:
-
Operating System and version:
-
How did you install git itself?
Hi,
if the author name contains brackets, the regex matching fails. Say, the authorname is Lastname, Firstname (External) parsing the git blame output
# With bracket
line = "SHA Filename (Lastname, Firstname (External) 2022-10-13 16:30:25 +0200 16)\n"
m = parse_line(line)
d = postprocess_parse_result(m)
for x in d:
print("{:14s} : {:4s}".format(x, d[x]))
gives
sha : SHA
file : Filename (Lastname, Firstname
author : External)
date : 2022-10-13
time : 16:30:25
timezone : +0200
line_number : 16
sha_normalised : SHA
I get correct results if I replace \s+ (?P<file>[\S ]+) with \s+ (?P<file>[\S]+) (remove the whitespace behind \S) in the parse_line function, but not sure if this will break for different examples.
Sublime Text version:
How did you install this package?:
Operating System and version:
How did you install git itself?
Hi,
if the author name contains brackets, the regex matching fails. Say, the authorname is
Lastname, Firstname (External)parsing the git blame outputgives
I get correct results if I replace
\s+ (?P<file>[\S ]+)with\s+ (?P<file>[\S]+)(remove the whitespace behind \S) in theparse_linefunction, but not sure if this will break for different examples.