Skip to content

Commit d234a99

Browse files
committed
Merge branch 'hotfix-petrzpav' into main-1
2 parents 3383a0c + ec6770f commit d234a99

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

7+
## [1.1.1] - 2025-05-15
8+
9+
### Fixed
10+
11+
- Fix fuzzy match highlight.
12+
713
## [1.1.0] - 2025-05-15
814

915
_Stable release based on [1.1.0-rc.1]._
@@ -345,6 +351,7 @@ _Stable release based on [0.1.0-rc.1]._
345351

346352
- New changelog file.
347353

354+
[1.1.1]: https://https://github.com/internetguru/laravel-model-browser/compare/v1.1.0...v1.1.1
348355
[1.1.0]: https://https://github.com/internetguru/laravel-model-browser/compare/v1.0.3...v1.1.0
349356
[1.1.0-rc.1]: https://github.com/internetguru/laravel-model-browser/releases/tag/v1.0.3
350357
[1.0.3]: https://https://github.com/internetguru/laravel-model-browser/compare/v1.0.2...v1.0.3

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.1.0
1+
1.1.1

src/Traits/HighlightMatchesTrait.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ protected function highlightMatches($data, string $filter, array $filterAttribut
2828
foreach ($filterAttributes as $attribute) {
2929
$originalValue = $item->{$attribute . 'Formatted'} ?? $item->{$attribute};
3030

31+
if (! $exactMatch) {
32+
$normalizedFilter = trim($normalizedFilter);
33+
}
34+
3135
if ($exactMatch && $normalizedFilter == '') {
3236
// Exact match with empty string
3337
$item->{$attribute . 'Highlighted'} = $originalValue == '' ? '<mark></mark>' : $originalValue;

0 commit comments

Comments
 (0)