Don't add line number to result_text if we're skipping this result.
This commit is contained in:
parent
2b4d2154e4
commit
fa3d12a782
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue