From 6fb3d0b74cd01950cfd4f7729f8b44693a3f0b46 Mon Sep 17 00:00:00 2001 From: Ludwig Reiter Date: Wed, 11 Oct 2023 14:39:09 +0200 Subject: [PATCH] Update global search to show marks bolder --- .../components/global-search/global-search.component.scss | 2 +- .../app/site/services/global-search/global-search.service.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/app/site/modules/global-headbar/components/global-search/global-search.component.scss b/client/src/app/site/modules/global-headbar/components/global-search/global-search.component.scss index d31312dfc2..9f61a790a2 100644 --- a/client/src/app/site/modules/global-headbar/components/global-search/global-search.component.scss +++ b/client/src/app/site/modules/global-headbar/components/global-search/global-search.component.scss @@ -80,7 +80,7 @@ ::ng-deep mark { color: inherit; background: none; - font-weight: 400; + font-weight: bolder; } ::ng-deep :not(h3, h3 > span) > mark { diff --git a/client/src/app/site/services/global-search/global-search.service.ts b/client/src/app/site/services/global-search/global-search.service.ts index 3f52d4cc44..c82930d151 100644 --- a/client/src/app/site/services/global-search/global-search.service.ts +++ b/client/src/app/site/services/global-search/global-search.service.ts @@ -56,7 +56,7 @@ export class GlobalSearchService { const result = results[fqid]; if (result.matched_by) { for (const field of Object.keys(result.matched_by)) { - if (result.content[field]) { + if (result.content[field] && field != `title`) { for (const word of result.matched_by[field]) { result.content[field] = `${result.content[field]}`.replace( new RegExp(word, `gi`),