Skip to content

Commit

Permalink
[BUGFIX] add u flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukas Mechsner committed Feb 14, 2020
1 parent 0e10e7f commit e4821c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SearchWordHighlighter.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function highlight($words)
});

// replace chained whitespace with a single space
$string = preg_replace('/[\s]+/s', ' ', $this->string);
$string = preg_replace('/[\s]+/us', ' ', $this->string);
$string = html_entity_decode($string);

if ($this->wordsBeforeMatch > 0) {
Expand Down

0 comments on commit e4821c5

Please sign in to comment.