mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 19:22:53 +01:00
Subrip: use platform indipendent line-break.
This commit is contained in:
parent
0c3fd449fe
commit
86e90039bf
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user