mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-21 18:52:36 +01:00
Fix crash in "Start with uppercase after colon" - thx Rouzax :)
Related to #8029
This commit is contained in:
parent
5ffb0f4b6b
commit
d1e66d2b53
@ -2126,6 +2126,17 @@ namespace Test.FixCommonErrors
|
||||
}
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void StartWithUppercaseAfterColon5()
|
||||
{
|
||||
using (var target = GetFixCommonErrorsLib())
|
||||
{
|
||||
InitializeFixCommonErrorsLine(target, "TRANSLATION FROM FRENCH:");
|
||||
new FixStartWithUppercaseLetterAfterColon().Fix(_subtitle, new EmptyFixCallback());
|
||||
Assert.AreEqual("TRANSLATION FROM FRENCH:", _subtitle.Paragraphs[0].Text);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Start with upppercase after colon
|
||||
|
||||
#region Fix Music Notation
|
||||
|
@ -42,7 +42,7 @@ namespace Nikse.SubtitleEdit.Core.Forms.FixCommonErrors
|
||||
// skip white space before formatting
|
||||
while (k < len && text[k] == ' ') k++;
|
||||
// skip formatting e.g: <i>, <b>,<font..>...
|
||||
while (k < len && text[k] == '<' || text[k] == '{')
|
||||
while (k < len && (text[k] == '<' || text[k] == '{'))
|
||||
{
|
||||
var closingPair = GetClosingPair(text[k]);
|
||||
var closeIdx = text.IndexOf(closingPair, k + 1);
|
||||
|
Loading…
Reference in New Issue
Block a user