Check for space after line comment marker

This commit is contained in:
alstr
2022-02-04 11:29:54 +00:00
parent 16fa734cc4
commit 830fd45809
2 changed files with 1 additions and 5 deletions

View File

@@ -404,7 +404,7 @@ class TodoParser(object):
for marker in block['markers']:
# Check if there are line or block comments.
if marker['type'] == 'line':
comment_pattern = r'(^[+\-\s].*' + marker['pattern'] + '.+$)'
comment_pattern = r'(^[+\-\s].*' + marker['pattern'] + r'\s.+$)'
comments = re.finditer(comment_pattern, block['hunk'], re.MULTILINE)
extracted_comments = []
prev_comment = None