diff --git a/components/Drawer.tsx b/components/Drawer.tsx index fd89284d..6a7b3809 100644 --- a/components/Drawer.tsx +++ b/components/Drawer.tsx @@ -89,7 +89,7 @@ const ResponsiveDrawer = (props: Props) => { }; return ( - + diff --git a/components/ResultView.tsx b/components/ResultView.tsx index 6bed565a..fc90f0e2 100644 --- a/components/ResultView.tsx +++ b/components/ResultView.tsx @@ -62,11 +62,7 @@ const fillHighlights = (snippet: string | null, full: string): string => { } const snippetRaw = htmlToText(snippet, { wordwrap: false }); - const styledSnippet = snippet.replace( - //g, - '' - ); - return full.replace(snippetRaw, styledSnippet); + return full.replace(snippetRaw, snippet); }; const COLORS = [ @@ -112,7 +108,7 @@ const ResultView = ({ result }: { result: SearchResult }) => { } = result; const displayName = - name && name.raw ? fillHighlights(name.snippet, name.raw.bold()) : null; + name && name.raw ? fillHighlights(name.snippet, name.raw) : null; const thumbnailImageUrl = thumbnail_image_url && thumbnail_image_url.raw diff --git a/components/ResultViewList.tsx b/components/ResultViewList.tsx index d6d5d044..011fc3ba 100644 --- a/components/ResultViewList.tsx +++ b/components/ResultViewList.tsx @@ -31,12 +31,7 @@ const ResultViewList = ({ {displayName && ( ]*>/g, - '' - ), - }} + dangerouslySetInnerHTML={{ __html: displayName }} /> )} @@ -61,12 +56,7 @@ const ResultViewList = ({ ]*>/g, - '' - ), - }} + dangerouslySetInnerHTML={{ __html: displayRole }} /> )} {displayRole && displayOrganisation && ( @@ -79,12 +69,7 @@ const ResultViewList = ({ ]*>/g, - '' - ), - }} + dangerouslySetInnerHTML={{ __html: displayOrganisation }} /> )} @@ -95,12 +80,7 @@ const ResultViewList = ({ ]*>/g, - '' - ), - }} + dangerouslySetInnerHTML={{ __html: displayCourseOfStudy }} /> )} @@ -110,12 +90,7 @@ const ResultViewList = ({ ]*>/g, - '' - ), - }} + dangerouslySetInnerHTML={{ __html: displaySchool }} /> )} @@ -125,12 +100,7 @@ const ResultViewList = ({ ]*>/g, - '' - ), - }} + dangerouslySetInnerHTML={{ __html: displayFullBio }} /> )}