Skip to content

Commit 3afef2d

Browse files
committed
taskmatch ends exclude block - fixes issue #31
1 parent 4d811e3 commit 3afef2d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

fqcn-fixer.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,7 @@ def increase_indent(self, flow=False, *dargs, **dkwargs): # pylint: disable=keyw
384384
if args.printdiff:
385385
originallines.append(line)
386386
nline = line
387+
taskmatch = _taskstartregex.match(line)
387388
if checkstartexcludeblock(line):
388389
in_ignore_block = True
389390
startingwhitespaces_ignore_block = re.match(r'\s*-?\s*', line).group()
@@ -398,11 +399,15 @@ def increase_indent(self, flow=False, *dargs, **dkwargs): # pylint: disable=keyw
398399
startingwhitespaces_ignore_block = None
399400
if args.debug:
400401
debugmsg('end exclude block!')
402+
elif taskmatch:
403+
in_ignore_block = False
404+
startingwhitespaces_ignore_block = None
405+
if args.debug:
406+
debugmsg('taskmatch in exclude block => end exclude block!')
401407
else:
402408
if args.debug:
403409
debugmsg('... in exclude block ... ignore line')
404410
if not in_ignore_block:
405-
taskmatch = _taskstartregex.match(line)
406411
if taskmatch:
407412
if args.debug:
408413
debugmsg('taskmatch: %s' % taskmatch)

0 commit comments

Comments
 (0)