From 40e9d5bafa454ce909486148fbdbd8ce7a44a84f Mon Sep 17 00:00:00 2001 From: Sage Raflik Date: Mon, 2 Sep 2024 14:53:15 -0500 Subject: [PATCH] Disable newlines in ListingContent Fixes bug where lists had double the line height they should have --- apps/tlon-web/src/diary/DiaryContent/DiaryContent.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/tlon-web/src/diary/DiaryContent/DiaryContent.tsx b/apps/tlon-web/src/diary/DiaryContent/DiaryContent.tsx index d8acb81156..a40be1614b 100644 --- a/apps/tlon-web/src/diary/DiaryContent/DiaryContent.tsx +++ b/apps/tlon-web/src/diary/DiaryContent/DiaryContent.tsx @@ -190,9 +190,13 @@ export function InlineContent({ story }: InlineContentProps) { export function ListingContent({ content }: { content: Listing }) { if ('item' in content) { + // Filter line breaks at end of list items to avoid doubling the line height + const item = isBreak(content.item.at(-1)) + ? content.item.slice(0, -1) + : content.item; return ( <> - {content.item.map((con, i) => ( + {item.map((con, i) => ( ))}