Skip to content

Commit

Permalink
修复标签移除的BUG Fix #165
Browse files Browse the repository at this point in the history
  • Loading branch information
nilaoda committed Jun 11, 2023
1 parent e7e3efe commit f1a3715
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/N_m3u8DL-RE.Common/Entity/WebVttSub.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,10 @@ private static string RemoveClassTag(string text)
{
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;
}
Expand Down

0 comments on commit f1a3715

Please sign in to comment.