Correctly highlight when query string is longer

This commit is contained in:
Clément Renault 2019-10-30 17:49:50 +01:00
parent b28c44cc6b
commit 45d4361e7d
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4

View File

@ -179,7 +179,7 @@ fn fetch_raw_documents(
let is_exact = *is_exact && distance == 0 && input.len() == *query_len;
let covered_area = if query.len() > input.len() {
query.len()
input.len()
} else {
prefix_damerau_levenshtein(query.as_bytes(), input).1
};