Fixed Replace words logic where it begin done on step text that is bolded

This commit is contained in:
John Jenko 2013-12-17 19:22:59 +00:00
parent 480c9c121e
commit 87734bb4d2

View File

@ -1736,7 +1736,8 @@ namespace Volian.Controls.Library
with = with.Replace(@"\ulnone ", ""); with = with.Replace(@"\ulnone ", "");
} }
text = text.Substring(0, offset + foundMatch.MyMatch.Index) + with + text.Substring(offset + foundMatch.MyMatch.Index + foundMatch.MyMatch.Length); 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;
} }
} }
} }