diff options
Diffstat (limited to 'plugins/base/frontend/src/main/components/search')
-rw-r--r-- | plugins/base/frontend/src/main/components/search/searchResultRow.tsx | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/plugins/base/frontend/src/main/components/search/searchResultRow.tsx b/plugins/base/frontend/src/main/components/search/searchResultRow.tsx index 9ae19cb9..81e1bad9 100644 --- a/plugins/base/frontend/src/main/components/search/searchResultRow.tsx +++ b/plugins/base/frontend/src/main/components/search/searchResultRow.tsx @@ -1,5 +1,6 @@ import React from "react"; import {OptionWithSearchResult, SearchProps, SearchRank} from "./types"; +import Markdown from '@jetbrains/ring-ui/components/markdown/markdown'; export const SearchResultRow: React.FC<SearchProps> = ({searchResult}: SearchProps) => { const signatureFromSearchResult = (searchResult: OptionWithSearchResult): string => { @@ -9,15 +10,9 @@ export const SearchResultRow: React.FC<SearchProps> = ({searchResult}: SearchPro return searchResult.highlight } - const renderHighlightMarkersAsHtml = (record: string): string => { - return record.replace(/\*\*(.*?)\*\*/g, '<span class="phraseHighlight">$1</span>') - } - return ( <div className="template-wrapper"> - <span dangerouslySetInnerHTML={ - {__html: renderHighlightMarkersAsHtml(signatureFromSearchResult(searchResult)) } - }/> + <span><Markdown source={signatureFromSearchResult(searchResult)}/></span> <span className="template-description">{searchResult.description}</span> </div> ) |