From db7727365976a4d804a8494c1c262b5aa40af639 Mon Sep 17 00:00:00 2001 From: Adam Waldenberg Date: Sun, 2 Jun 2013 19:14:25 +0200 Subject: [PATCH] Fixed a potential error with comment detection. This particular faulty detection could only occur when multi-line comments were used as single-line comments. --- blame.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blame.py b/blame.py index be4d606..e2a09f2 100644 --- a/blame.py +++ b/blame.py @@ -74,8 +74,8 @@ class BlameThread(threading.Thread): is_inside_comment = False else: self.blames[(author, self.filename)].comments += 1 - elif comment.has_comment_begining(self.extension, content): - is_inside_comment = True + elif comment.has_comment_begining(self.extension, content) and not comment.has_comment_end(self.extension, content): + is_inside_comment = True; self.blames[(author, self.filename)].rows += 1 __blame_lock__.release() # ...to here.