Fix search

This commit is contained in:
Joakim Hellsén 2022-12-12 16:33:22 +01:00
commit ec49fe15fa
No known key found for this signature in database
GPG key ID: 01FD861E3DAC09AC
2 changed files with 2 additions and 2 deletions

View file

@ -44,7 +44,7 @@ def add_span_with_slice(highlighted_string: HighlightedString) -> str:
str: The string with added <span> tags.
"""
# TODO: We are looping through the highlights and only using the last one. We should use all of them.
before_span, span_part, after_span = ""
before_span, span_part, after_span = "", "", ""
for txt_slice in highlighted_string.highlights:
before_span: str = f"{highlighted_string.value[: txt_slice.start]}"