diff --git a/app/ListItem.tsx b/app/ListItem.tsx index ce523da..7a06920 100644 --- a/app/ListItem.tsx +++ b/app/ListItem.tsx @@ -52,18 +52,16 @@ export const ListItem = (props: { onSelect: () => void; }) => { const { entry } = props; + const text = entry.text.replaceAll(/\n/g, ' '); const summary = props.searchQuery?.keyword - ? generateSummaryEntity(entry.text, props.searchQuery.keyword, { + ? generateSummaryEntity(text, props.searchQuery.keyword, { maxLength: 120, beforeLength: 50, }) : undefined; + const SummaryComponent = () => - summary ? ( - - ) : ( - - ); + summary ? : ; return (