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

View File

@ -46,10 +46,6 @@ class NewIssueTests(unittest.TestCase):
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'tex'), 2)
def test_julia_issues(self):
# TODO: Fix Julia markers
# The Julia tests are currently failing as @qwinters noticed in #96.
# It looks to be counting block comments twice as the line marker appears within the block marker.
# labels: bug
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'julia'), 2)
def test_autohotkey_issues(self):