Fixed B2015-072, replace words crashing on ‘ [‘ where space is part of bold rtf command.
Allow for a step transition to go to another procedure
This commit is contained in:
parent
e8eed87c3b
commit
804da7a3ca
Binary file not shown.
@ -1817,7 +1817,7 @@ namespace Volian.Controls.Library
|
||||
// don't use the \W, i.e. don't bother to look for a non-word character.
|
||||
string wordMatchBeg = Regex.IsMatch(replaceWord.Substring(0, 1), @"\W") ? "" : @"(?<=\W|^)";
|
||||
string wordMatchEnd = Regex.IsMatch(replaceWord.Substring(replaceWord.Length - 1, 1), @"\W") ? "" : @"(?=\W|$)";
|
||||
string pat = wordMatchBeg + @"(?<!\\u160\?|\\u8209\?)" + replaceWord + @"(?!\\u160\?|\\u8209\?)" + wordMatchEnd;
|
||||
string pat = wordMatchBeg + @"(?<!\\u160\?|\\u8209\?|\\b)" + replaceWord + @"(?!\\u160\?|\\u8209\?)" + wordMatchEnd;
|
||||
dicReplaceRegex.Add(rs, new Regex(pat, myOptions));
|
||||
//ProfileTimer.Pop(profileDepth3);
|
||||
}
|
||||
@ -2101,7 +2101,7 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
string preceedingText = text.Substring(0, offset + foundMatch.MyMatch.Index);
|
||||
int ndxBold = preceedingText.LastIndexOf(@"\b");
|
||||
if (ndxBold > -1 && preceedingText[ndxBold + 2] != '0' && with.Contains(@"\b "))
|
||||
if (ndxBold > -1 && preceedingText.Length>(ndxBold+2) && preceedingText[ndxBold + 2] != '0' && with.Contains(@"\b "))
|
||||
{
|
||||
with = with.Replace(@"\b ","");
|
||||
with = with.Replace(@"\b0 ","");
|
||||
|
Loading…
x
Reference in New Issue
Block a user