Skip to content

Commit

Permalink
Disable newlines in ListingContent
Browse files Browse the repository at this point in the history
Fixes bug where lists had double the line height they should have
  • Loading branch information
neonfuz authored and latter-bolden committed Sep 3, 2024
1 parent 55228b1 commit 40e9d5b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/tlon-web/src/diary/DiaryContent/DiaryContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) => (
<InlineContent key={`${i}-${con}`} story={con} />
))}
</>
Expand Down

0 comments on commit 40e9d5b

Please sign in to comment.