diff --git a/web/src/components/citations.tsx b/web/src/components/citations.tsx index 8dc06bc..3eb1b7b 100644 --- a/web/src/components/citations.tsx +++ b/web/src/components/citations.tsx @@ -71,7 +71,8 @@ export const ShowCitation: React.FC<{ citation: Citation }> = ({ citation, }) => { var c_str = citation.title; - + const split = citation.text.split('"""'); + const text = split.length === 1 ? citation.text : split[1]; if (citation.authors && citation.authors.length > 0) c_str += " - " + citation.authors.join(", "); if (citation.date && citation.date !== "") c_str += " - " + citation.date; @@ -83,16 +84,18 @@ export const ShowCitation: React.FC<{ citation: Citation }> = ({ : `https://duckduckgo.com/?q=${encodeURIComponent(citation.title)}`; return ( - - [{citation.index}] -

{c_str}

-
+ + + [{citation.index}] +

{c_str}

+
+
); }; @@ -121,7 +124,7 @@ export const CitationRef: React.FC<{ citation?: Citation }> = ({ citation, }) => { if (!citation) return null; - + const split = citation.text.split('"""'); const text = split.length === 1 ? citation.text : split[1]; const url =