change br to new line simplified - thx alfaproject :)

This commit is contained in:
niksedk 2014-09-16 19:21:59 +02:00
parent 7ed4c4ad6c
commit 50807024c7

View File

@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using System.Text.RegularExpressions;
namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
{
@ -313,21 +314,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
text = text.Replace(" ", " ");
text = text.TrimEnd();
text = text.Replace("<BR>", Environment.NewLine);
text = text.Replace("<BR/>", Environment.NewLine);
text = text.Replace("<BR />", Environment.NewLine);
text = text.Replace("<br>", Environment.NewLine);
text = text.Replace("<br/>", Environment.NewLine);
text = text.Replace("<br />", Environment.NewLine);
text = text.Replace("<Br>", Environment.NewLine);
text = text.Replace("<Br/>", Environment.NewLine);
text = text.Replace("<Br />", Environment.NewLine);
text = text.Replace("<bR>", Environment.NewLine);
text = text.Replace("<bR/>", Environment.NewLine);
text = text.Replace("<bR />", Environment.NewLine);
text = Regex.Replace(text, @"<br {0,2}/?>", Environment.NewLine, RegexOptions.IgnoreCase);
while (text.Contains(" "))
text = text.Replace(" ", " ");