Skip to content

Commit

Permalink
taskmatch ends exclude block - fixes issue #31
Browse files Browse the repository at this point in the history
  • Loading branch information
zerwes committed Jan 8, 2025
1 parent 4d811e3 commit 3afef2d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion fqcn-fixer.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ def increase_indent(self, flow=False, *dargs, **dkwargs): # pylint: disable=keyw
if args.printdiff:
originallines.append(line)
nline = line
taskmatch = _taskstartregex.match(line)
if checkstartexcludeblock(line):
in_ignore_block = True
startingwhitespaces_ignore_block = re.match(r'\s*-?\s*', line).group()
Expand All @@ -398,11 +399,15 @@ def increase_indent(self, flow=False, *dargs, **dkwargs): # pylint: disable=keyw
startingwhitespaces_ignore_block = None
if args.debug:
debugmsg('end exclude block!')
elif taskmatch:
in_ignore_block = False
startingwhitespaces_ignore_block = None
if args.debug:
debugmsg('taskmatch in exclude block => end exclude block!')
else:
if args.debug:
debugmsg('... in exclude block ... ignore line')
if not in_ignore_block:
taskmatch = _taskstartregex.match(line)
if taskmatch:
if args.debug:
debugmsg('taskmatch: %s' % taskmatch)
Expand Down

0 comments on commit 3afef2d

Please sign in to comment.