diff --git a/bskyogcard/src/components/RichText.tsx b/bskyogcard/src/components/RichText.tsx index 2225f4ffa1..b24e79711c 100644 --- a/bskyogcard/src/components/RichText.tsx +++ b/bskyogcard/src/components/RichText.tsx @@ -15,7 +15,7 @@ export function RichText({ cx?: Record[] }) { const {text, facets} = value - const baseStyles = [a.leading_snug, ...cx] + const baseStyles = [a.leading_snug, {whiteSpace: 'pre-wrap'}, ...cx] const linkStyles = [ { color: t.palette.primary_500, @@ -49,7 +49,7 @@ export function RichText({ } else if (link && AppBskyRichtextFacet.validateLink(link).success) { const url = toShortUrl(text) if (disableLinks) { - els.push({url}) + els.push(url) } else { els.push( @@ -64,11 +64,14 @@ export function RichText({ ) { els.push( - {segment.text} + {text} , ) } else { - els.push({segment.text}) + els.push(text) + } + if (/\n/.test(text)) { + els.push() } key++ } diff --git a/bskyogcard/src/components/Text.tsx b/bskyogcard/src/components/Text.tsx index 6c99296fc5..d6a0900e1c 100644 --- a/bskyogcard/src/components/Text.tsx +++ b/bskyogcard/src/components/Text.tsx @@ -15,7 +15,7 @@ export function Text({ a.flex, a.flex_wrap, { - columnGap: a.gap_xs.gap, + columnGap: '1px', }, a.font_normal, a.leading_tight,