From 87734bb4d2f21966e77f8d58234c17012b4802c4 Mon Sep 17 00:00:00 2001 From: John Date: Tue, 17 Dec 2013 19:22:59 +0000 Subject: [PATCH] Fixed Replace words logic where it begin done on step text that is bolded --- PROMS/Volian.Controls.Library/DisplayText.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PROMS/Volian.Controls.Library/DisplayText.cs b/PROMS/Volian.Controls.Library/DisplayText.cs index cce1ea5c..62b12a62 100644 --- a/PROMS/Volian.Controls.Library/DisplayText.cs +++ b/PROMS/Volian.Controls.Library/DisplayText.cs @@ -1736,7 +1736,8 @@ namespace Volian.Controls.Library with = with.Replace(@"\ulnone ", ""); } text = text.Substring(0, offset + foundMatch.MyMatch.Index) + with + text.Substring(offset + foundMatch.MyMatch.Index + foundMatch.MyMatch.Length); - offset += foundMatch.MyWord.ReplaceWith.Length - foundMatch.MyMatch.Length; + //offset += foundMatch.MyWord.ReplaceWith.Length - foundMatch.MyMatch.Length; + offset += with.Length - foundMatch.MyMatch.Length; } } }