Skip to content

Commit

Permalink
Resolves #109
Browse files Browse the repository at this point in the history
  • Loading branch information
collectiveaccess committed Aug 9, 2024
1 parent be28498 commit 3cf3177
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/lib/Search/SearchResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -3945,7 +3945,7 @@ private function highlight($content) {
return strlen($b) <=> strlen($a);
});

$content = $g_highlight_cache[$content] = preg_replace("/(?<![A-Za-z0-9\/=<])(".join('|', $highlight_text).")/i", "<span class=\"highlightText\">\\1</span>", $content);
$content = $g_highlight_cache[$content] = preg_replace("/(?<= |^)(".join('|', $highlight_text).")/i", "<span class=\"highlightText\">\\1</span>", $content);

return $content;
}
Expand Down

0 comments on commit 3cf3177

Please sign in to comment.