From 50807024c72162019497d71921c7a404f1fe34cf Mon Sep 17 00:00:00 2001 From: niksedk Date: Tue, 16 Sep 2014 19:21:59 +0200 Subject: [PATCH] change br to new line simplified - thx alfaproject :) --- src/Logic/SubtitleFormats/Sami.cs | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/Logic/SubtitleFormats/Sami.cs b/src/Logic/SubtitleFormats/Sami.cs index c8d1c3dcd..2cb2d90bb 100644 --- a/src/Logic/SubtitleFormats/Sami.cs +++ b/src/Logic/SubtitleFormats/Sami.cs @@ -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("
", Environment.NewLine); - text = text.Replace("
", Environment.NewLine); - text = text.Replace("
", Environment.NewLine); - - text = text.Replace("
", Environment.NewLine); - text = text.Replace("
", Environment.NewLine); - text = text.Replace("
", Environment.NewLine); - - text = text.Replace("
", Environment.NewLine); - text = text.Replace("
", Environment.NewLine); - text = text.Replace("
", Environment.NewLine); - - text = text.Replace("
", Environment.NewLine); - text = text.Replace("
", Environment.NewLine); - text = text.Replace("
", Environment.NewLine); + text = Regex.Replace(text, @"
", Environment.NewLine, RegexOptions.IgnoreCase); while (text.Contains(" ")) text = text.Replace(" ", " ");