From 12555a5933634ee2ce88c2b29f95d1a0a8b94e5a Mon Sep 17 00:00:00 2001 From: frost768 Date: Thu, 16 Mar 2023 22:10:45 +0300 Subject: [PATCH] remove parent span --- src/video/components/Caption.tsx | 1 + src/video/components/CaptionRenderer.tsx | 14 ++++++-------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/video/components/Caption.tsx b/src/video/components/Caption.tsx index af3b8b80..34cca5af 100644 --- a/src/video/components/Caption.tsx +++ b/src/video/components/Caption.tsx @@ -17,6 +17,7 @@ export function Caption({ text }: { text?: string }) { }), }} style={{ + whiteSpace: "pre-line", ...captionSettings.style, }} /> diff --git a/src/video/components/CaptionRenderer.tsx b/src/video/components/CaptionRenderer.tsx index ed56781d..25118d11 100644 --- a/src/video/components/CaptionRenderer.tsx +++ b/src/video/components/CaptionRenderer.tsx @@ -50,14 +50,12 @@ export function CaptionRenderer({ animation="slide-up" show > - - {captions.current.map( - ({ identifier, end, start, text }) => - isVisible(start, end) && ( - - ) - )} - + {captions.current.map( + ({ identifier, end, start, text }) => + isVisible(start, end) && ( + + ) + )} ); }