Subrip: use platform indipendent line-break.

This commit is contained in:
Ivandro Ismael 2019-02-21 17:00:52 +00:00
parent 0c3fd449fe
commit 86e90039bf

View File

@ -48,12 +48,12 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
public override string ToText(Subtitle subtitle, string title)
{
const string paragraphWriteFormat = "{0}\r\n{1} --> {2}\r\n{3}\r\n\r\n";
const string paragraphWriteFormat = "{0}{4}{1} --> {2}{4}{3}{4}{4}";
var sb = new StringBuilder();
foreach (Paragraph p in subtitle.Paragraphs)
{
sb.AppendFormat(paragraphWriteFormat, p.Number, p.StartTime, p.EndTime, p.Text);
sb.AppendFormat(paragraphWriteFormat, p.Number, p.StartTime, p.EndTime, p.Text, Environment.NewLine);
}
return sb.ToString().Trim() + Environment.NewLine + Environment.NewLine;
}