Fix NoBreakAfterItem.IsMatch()

Fixes #3853
This commit is contained in:
Waldi Ravens 2019-11-28 05:47:33 +01:00
parent 7a625f7b3b
commit dce7c5a6d6
2 changed files with 2 additions and 2 deletions

View File

@ -32,7 +32,7 @@ namespace Nikse.SubtitleEdit.Core
return Regex.IsMatch(line);
}
return line.EndsWith(Text, StringComparison.Ordinal);
return line.EndsWith($" {Text}", StringComparison.Ordinal) || line.Equals(Text, StringComparison.Ordinal);
}
public override string ToString()

View File

@ -273,7 +273,7 @@ namespace Nikse.SubtitleEdit.Core
}
else
{
_lastNoBreakAfterList.Add(new NoBreakAfterItem(" " + node.InnerText.TrimStart()));
_lastNoBreakAfterList.Add(new NoBreakAfterItem(node.InnerText.TrimStart()));
}
}
}