Skip to content

Commit

Permalink
Show normalized text in citation popup
Browse files Browse the repository at this point in the history
  • Loading branch information
mrtcode committed Oct 16, 2024
1 parent d0e1bc5 commit c19bff1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default function FormattedText({ chars, onOpenLink }) {
// Convert the chars array to JSX by grouping and formatting
const formattedText = React.useMemo(() => {
return chars.reduce((acc, char, index) => {
const { u: currentChar, bold: isBold, italic: isItalic, url, spaceAfter } = char;
const { c: currentChar, bold: isBold, italic: isItalic, url, spaceAfter } = char;
if (!char.ignorable) {
// Start a new group if different style or first character
if (index === 0 || acc[acc.length - 1].isBold !== isBold || acc[acc.length - 1].isItalic !== isItalic || acc[acc.length - 1].url !== url) {
Expand Down

0 comments on commit c19bff1

Please sign in to comment.