From 156d4b32ba81e3d94524b7090142527cf8cb2a0e Mon Sep 17 00:00:00 2001 From: John Date: Thu, 27 Feb 2014 17:31:51 +0000 Subject: [PATCH] Fixed issue in Braidwood data that was underlining after a dash space when that dash space was in a transition --- PROMS/Volian.Controls.Library/DisplayText.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/PROMS/Volian.Controls.Library/DisplayText.cs b/PROMS/Volian.Controls.Library/DisplayText.cs index 55b67e01..2a1e14bf 100644 --- a/PROMS/Volian.Controls.Library/DisplayText.cs +++ b/PROMS/Volian.Controls.Library/DisplayText.cs @@ -205,8 +205,11 @@ namespace Volian.Controls.Library } private bool InLinkedText(string text, int idx) { - int endLink = text.Substring(0,idx).IndexOf(@"\[END>"); - return (endLink > -1); + MatchCollection mc = Regex.Matches(text, @""); + 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) {