Bug fix: printing of code blocks in case of string literal matches.

This commit is contained in:
Achim D. Brucker 2017-10-09 11:57:57 +01:00
parent aa143b2724
commit ae8ea47ab8
1 changed files with 2 additions and 3 deletions

View File

@ -124,7 +124,7 @@ def print_block(conf,
else:
classifier = "C"
if block.is_code and string_match:
if block.is_code() and string_match:
if conf.join_string_literals:
loc = '({0:d} - {1:d})'.format(block.start[0], block.start[1])
loc = (' ' * (11 - len(loc))) + loc
@ -139,8 +139,7 @@ def print_block(conf,
print(line)
if code_match:
print("-" * (len(path) + 17))
if block.is_comment or (block.is_code and code_match):
if block.is_comment() or (block.is_code() and code_match):
for line in block.content.splitlines(True):
if line_no == block.start[0]:
line = prefix + line