mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 19:22:53 +01:00
Fix (probably extremely rare) missing space before $ - thx Aleksander :)
This commit is contained in:
parent
dc3a1c4897
commit
5d88099601
@ -276,7 +276,7 @@ namespace Nikse.SubtitleEdit.Core.Forms.FixCommonErrors
|
||||
{
|
||||
if (newText.Length > index + 4 && index >= 1)
|
||||
{
|
||||
if (Utilities.AllLettersAndNumbers.Contains(newText[index + 3]) &&
|
||||
if ((Utilities.AllLettersAndNumbers + "$").Contains(newText[index + 3]) &&
|
||||
Utilities.AllLettersAndNumbers.Contains(newText[index - 1]))
|
||||
{
|
||||
newText = newText.Insert(index + 3, " ");
|
||||
|
@ -707,6 +707,17 @@ namespace Test.FixCommonErrors
|
||||
}
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void FixMissingSpacesAfterThreeDotsBeforeDollarSign()
|
||||
{
|
||||
using (var target = GetFixCommonErrorsLib())
|
||||
{
|
||||
InitializeFixCommonErrorsLine(target, "Give me...$20!");
|
||||
new FixMissingSpaces().Fix(_subtitle, new EmptyFixCallback { Language = "en" });
|
||||
Assert.AreEqual("Give me... $20!", _subtitle.Paragraphs[0].Text);
|
||||
}
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void FixMissingSwedish()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user