Formatting (whitespace only)

This commit is contained in:
Waldi Ravens 2015-06-14 19:15:35 +02:00
parent abdd80e672
commit f54cf304a3
4 changed files with 7 additions and 6 deletions

View File

@ -139,7 +139,7 @@ namespace Nikse.SubtitleEdit.Core
if (count != buffer.Length)
return false;
return buffer[0] == 0xFF
return buffer[0] == 0xFF
&& buffer[1] == 0xD8
&& buffer[2] == 0xFF;
}

View File

@ -355,6 +355,7 @@ namespace Nikse.SubtitleEdit.Logic.Forms
// Okay! Narrator: Hello!
if (pre.IndexOfAny(new[] { '!', '?' }) > 0)
return false;
return true;
}
@ -889,7 +890,6 @@ namespace Nikse.SubtitleEdit.Logic.Forms
text = text.TrimStart('-').TrimStart();
}
}
return text;
}

View File

@ -2960,7 +2960,7 @@ namespace Nikse.SubtitleEdit.Logic
// Hi <i> bad</i> man! -> Hi <i>bad</i> man!
text = text.Replace(" " + openTag + " ", " " + openTag);
text = text.Replace(Environment.NewLine + openTag + " ", Environment.NewLine + openTag);
text = text.Replace(Environment.NewLine + openTag + " ", Environment.NewLine + openTag);
// Hi <i>bad </i> man! -> Hi <i>bad</i> man!
text = text.Replace(" " + closeTag + " ", closeTag + " ");
@ -3210,4 +3210,4 @@ namespace Nikse.SubtitleEdit.Logic
}
}
}
}

View File

@ -31,7 +31,7 @@ namespace Test.Logic.SubtitleFormats
{
_testContextInstance = value;
}
}
}
#region Additional test attributes
@ -67,7 +67,8 @@ namespace Test.Logic.SubtitleFormats
#region SubRip (.srt)
private static List<string> GetSrtLines(string text){
private static List<string> GetSrtLines(string text)
{
var lines = new List<string>();
string[] arr = text.Replace(Environment.NewLine, "\r").Replace("\n", "\r").Split('\r');
foreach (string line in arr)