File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -120,6 +120,8 @@ def __init__(self, options):
120120
121121 self .exclude_blocks = options .get ("exclude_blocks" )
122122
123+ self .exclude_blocks = options .get ("exclude_blocks" )
124+
123125 self .debug_checked = False
124126
125127 self .django_template_dir = os .path .normcase (os .path .realpath (
@@ -334,6 +336,12 @@ def lines(self):
334336 self ._excluded .add (token .lineno )
335337 continue
336338
339+ # Ignore any block token content that has been explcitly
340+ # excluded in config
341+ if self .exclude_block_token (token ):
342+ self ._excluded .add (token .lineno )
343+ continue
344+
337345 if token .contents == "comment" :
338346 comment = True
339347 if token .contents .startswith ("end" ):
@@ -371,13 +379,17 @@ def lines(self):
371379
372380 return source_lines
373381
382+
374383 def excluded_lines (self ):
375384 return self ._excluded
376385
377386 def exclude_block_token (self , token ):
378387 if self .exclude_blocks_regex :
379388 return self .exclude_blocks_regex .search (token .contents )
389+ < << << << HEAD
380390
391+ == == == =
392+ >> >> >> > origin / master
381393
382394def running_sum (seq ):
383395 total = 0
You can’t perform that action at this time.
0 commit comments