Skip to content

Commit

Permalink
One last minor fix for the new "don't auto-break dialogues"
Browse files Browse the repository at this point in the history
  • Loading branch information
niksedk committed Feb 23, 2014
1 parent dd5bb46 commit c89a3bb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Logic/Utilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -484,8 +484,9 @@ public static string AutoBreakLine(string text, int mininumLength, int maximumLe
if (text.Contains("-") && text.Contains(Environment.NewLine))
{
string dialogS = Utilities.RemoveHtmlTags(text);
var arr = text.Replace(Environment.NewLine, "\n").Split('\n');
if (arr.Length == 2 && arr[0].Trim().StartsWith("-") && arr[1].Trim().StartsWith("-"))
var arr = dialogS.Replace(Environment.NewLine, "\n").Split('\n');
if (arr.Length == 2 && arr[0].Trim().StartsWith("-") && arr[1].Trim().StartsWith("-") &&
(arr[0].Trim().EndsWith(".") || arr[0].Trim().EndsWith("!") || arr[0].Trim().EndsWith("?")))
return text;
}

Expand Down

0 comments on commit c89a3bb

Please sign in to comment.