Stop truncating quote-tweet text, keep media at thumbnail size
extractQuotedTweet() was capping the quoted tweet's text at 240 characters via toSummary(); it now keeps the full cleaned text, matching the outer tweet's own body which was never truncated. Dropped the matching -webkit-line-clamp: 3 on .quoted-text in TweetCard.svelte so the full text actually renders instead of being clipped after 3 lines. Media sizing (.quoted-img's 140px cap, the media grid's fixed cell heights) is unchanged — only text was meant to stay unconstrained. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014c1L8ghNBFjfiH64UMViP8
This commit is contained in:
@@ -11,7 +11,7 @@ import type { Source, TweetMediaItem, QuotedTweet } from '../../storage/db/types
|
||||
import type { SourceAdapter, FetchedItem } from './base.js';
|
||||
import { logger } from '../../storage/db/logs.js';
|
||||
import { getSettings } from '../../storage/db/settings.js';
|
||||
import { cleanHtml, toSummary } from '../clean.js';
|
||||
import { cleanHtml } from '../clean.js';
|
||||
|
||||
/** fxtwitter caps a tweet at 4 attached photos/videos/gifs, in tweet display order. */
|
||||
const MAX_TWEET_MEDIA = 4;
|
||||
@@ -136,7 +136,7 @@ function extractQuotedTweet(descriptionHtml: string): QuotedTweet | null {
|
||||
return {
|
||||
authorName: authorMatch[1].trim(),
|
||||
authorHandle: authorMatch[2].trim(),
|
||||
text: toSummary(cleanHtml(beforeFooter), 240),
|
||||
text: cleanHtml(beforeFooter),
|
||||
imageUrl: extractImageUrl(inner),
|
||||
link: linkMatch[1]
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user