From f1a371575ca367f15296e5a2b3fa80e6c6ab8f98 Mon Sep 17 00:00:00 2001 From: nilaoda Date: Sun, 11 Jun 2023 20:12:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=A0=87=E7=AD=BE=E7=A7=BB?= =?UTF-8?q?=E9=99=A4=E7=9A=84BUG=20Fix=20#165?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/N_m3u8DL-RE.Common/Entity/WebVttSub.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/N_m3u8DL-RE.Common/Entity/WebVttSub.cs b/src/N_m3u8DL-RE.Common/Entity/WebVttSub.cs index 6e9c027..9a637c7 100644 --- a/src/N_m3u8DL-RE.Common/Entity/WebVttSub.cs +++ b/src/N_m3u8DL-RE.Common/Entity/WebVttSub.cs @@ -126,7 +126,10 @@ namespace N_m3u8DL_RE.Common.Entity { if (VttClassRegex().IsMatch(text)) { - return VttClassRegex().Match(text).Groups[1].Value; + return string.Join(Environment.NewLine, text.Split('\n').Select(line => line.TrimEnd()).Select(line => + { + return string.Concat(VttClassRegex().Matches(line).Select(x => x.Groups[1].Value + " ")); + })).TrimEnd(); } else return text; }