Merge pull request #1462 from ivandrofly/patch-x

Cleanup + Refactor
This commit is contained in:
Nikolaj Olsson 2015-12-27 08:50:21 +01:00
commit 02bf8f645c
3 changed files with 5 additions and 7 deletions

View File

@ -534,7 +534,7 @@ namespace Nikse.SubtitleEdit.Core
if (italicBeginTagCount == 0 && italicEndTagCount == 1)
{
var cleanText = HtmlUtil.RemoveOpenCloseTags(text, HtmlUtil.TagItalic, HtmlUtil.TagBold, HtmlUtil.TagUnderline, HtmlUtil.TagCyrillicI);
var cleanText = RemoveOpenCloseTags(text, TagItalic, TagBold, TagUnderline, TagCyrillicI);
bool isFixed = false;
// Foo.</i>

View File

@ -429,7 +429,7 @@ namespace Nikse.SubtitleEdit.Core
/// </summary>
public int GetIndex(double seconds)
{
var totalMilliseconds = seconds * 1000.0;
var totalMilliseconds = seconds * TimeCode.BaseUnit;
for (int i = 0; i < Paragraphs.Count; i++)
{
var p = Paragraphs[i];

View File

@ -1240,8 +1240,6 @@ namespace Nikse.SubtitleEdit.Core
return Uri.UnescapeDataString(text);
}
public static string FixEnglishTextInRightToLeftLanguage(string text, string reverseChars)
{
var sb = new StringBuilder();
@ -1657,10 +1655,10 @@ namespace Nikse.SubtitleEdit.Core
private static int FindNext(string s, string[] parts, int startIndex)
{
for (int i = startIndex; i < parts.Length; i++)
for (; startIndex < parts.Length; startIndex++)
{
if (s == parts[i])
return i;
if (s == parts[startIndex])
return startIndex;
}
return int.MaxValue;
}