Fixed issue in Braidwood data that was underlining after a dash space when that dash space was in a transition

This commit is contained in:
John Jenko 2014-02-27 17:31:51 +00:00
parent e6703e88a1
commit 156d4b32ba

View File

@ -205,8 +205,11 @@ namespace Volian.Controls.Library
} }
private bool InLinkedText(string text, int idx) private bool InLinkedText(string text, int idx)
{ {
int endLink = text.Substring(0,idx).IndexOf(@"\[END>"); MatchCollection mc = Regex.Matches(text, @"<START\].*?\[END>");
return (endLink > -1); if (mc.Count == 0) return false;
foreach (Match m in mc)
if (m.Index < idx && m.Index + m.Length > idx) return true;
return (false);
} }
private string CreateRtf(bool colorLinks, string text, bool tableShouldBeOutlined, bool wordsShouldBeReplaced, bool numbersShouldBeFormated, bool tableHasBorder, bool ROsShouldBeAdjusted, bool underlineAfterDashSpace) private string CreateRtf(bool colorLinks, string text, bool tableShouldBeOutlined, bool wordsShouldBeReplaced, bool numbersShouldBeFormated, bool tableHasBorder, bool ROsShouldBeAdjusted, bool underlineAfterDashSpace)
{ {