mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 03:02:35 +01:00
Fix for auto br line / French - thx Norbert :)
This commit is contained in:
parent
14ccc6960e
commit
6026ab6989
@ -64,6 +64,15 @@ namespace Test.Logic
|
||||
Assert.AreEqual(s1, s2);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void AutoBreakFrenchSpaceBeforePunctuation()
|
||||
{
|
||||
Configuration.Settings.General.SubtitleLineMaximumLength = 43;
|
||||
string s1 = "Et elle te le dis maintenant ? Pour quoi donc ?";
|
||||
string s2 = Utilities.AutoBreakLine(s1, "fr");
|
||||
Assert.AreEqual("Et elle te le dis maintenant ?" + Environment.NewLine + "Pour quoi donc ?", s2);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void AutoBreakLine5DoNoBreakAtTwoMusicTaggedLines()
|
||||
{
|
||||
|
@ -248,6 +248,15 @@ namespace Nikse.SubtitleEdit.Core.Common
|
||||
return false;
|
||||
}
|
||||
|
||||
if (nextChar == ' ' && language == "fr" && index + 1 < s.Length)
|
||||
{
|
||||
var nextNext = s[index + 1];
|
||||
if (nextNext == '?' || nextNext == '!' || nextNext == '.')
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user