diff --git a/libse/HtmlUtil.cs b/libse/HtmlUtil.cs index 4e6b3ca65..eadc01bdb 100644 --- a/libse/HtmlUtil.cs +++ b/libse/HtmlUtil.cs @@ -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. diff --git a/libse/Subtitle.cs b/libse/Subtitle.cs index 8a9821d51..39c2d312b 100644 --- a/libse/Subtitle.cs +++ b/libse/Subtitle.cs @@ -429,7 +429,7 @@ namespace Nikse.SubtitleEdit.Core /// 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]; diff --git a/libse/Utilities.cs b/libse/Utilities.cs index 5acb6b8a4..9f6c8ae50 100644 --- a/libse/Utilities.cs +++ b/libse/Utilities.cs @@ -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; }