Don't add line number to result_text if we're skipping this result.

This commit is contained in:
voussoir 2020-09-11 16:07:51 -07:00
parent 2b4d2154e4
commit fa3d12a782

View file

@ -181,12 +181,12 @@ def search(
search_text = search_object
result_text = search_object
if line_numbers:
result_text = f'{index+1:>4} | {result_text}'
if not all_terms_match(search_text, terms, term_matches):
continue
if line_numbers:
result_text = f'{index+1:>4} | {result_text}'
if not content_args:
yield result_text
continue