Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/components/ItemCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ export default function ItemCard({
<Typography
variant="body2"
sx={{
whiteSpace: "pre-wrap",
lineHeight: 1.9,
color: "text.primary",
pl: 2,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding an inline comment explaining why whiteSpace: "pre-wrap" is needed:

sx={{
  // Preserve line breaks and spaces to prevent text collapsing (fixes #70)
  whiteSpace: "pre-wrap",
  lineHeight: 1.9,
  // ...
}}

This helps future maintainers understand the purpose and prevents accidental removal.

Expand Down
1 change: 1 addition & 0 deletions src/components/ShareCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ const ShareCard = forwardRef<HTMLDivElement, ShareCardProps>(
textAlign: "justify",
textIndent: "2em",
wordBreak: "break-word",
whiteSpace: "pre-wrap",
fontFamily: "'Noto Serif SC', 'Songti SC', serif"
}}>
{truncateText(item.content, maxLength)}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as ItemCard.tsx - consider adding a comment:

wordBreak: "break-word",
// Preserve line breaks and spaces (fixes #70)
whiteSpace: "pre-wrap",
fontFamily: "'Noto Serif SC', 'Songti SC', serif"

This ensures the exported share card maintains consistent formatting with the display views.

Expand Down