C2021-061 don’t process replace words if they are delimited with “()” or “,’ (quotes from 11/3/21)
This commit is contained in:
@@ -2123,8 +2123,8 @@ namespace VEPROMS.CSLA.Library
|
||||
string wordMatchEnd = Regex.IsMatch(replaceWord.Substring(replaceWord.Length - 1, 1), @"\W") ? "" : @"(?=\W|$)";
|
||||
string pat = wordMatchBeg + @"(?<!\\u160\?|\\u8209\?|\\b|\-)" + replaceWord + @"(?!\\u160\?|\\u8209\?|\-)" + wordMatchEnd;
|
||||
// C2021-061: For Barakah don't do replace if word is surrounded by " or ', i.e. they are no longer delimiters
|
||||
if (_MyItemInfo != null && _MyItemInfo.ActiveFormat != null && _MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.NoReplaceQuoteWords)
|
||||
pat = wordMatchBeg + @"(?<!\\u160\?|\\u8209\?|\\b|\-|""|')" + replaceWord + @"(?!\\u160\?|\\u8209\?|\-|""|')" + wordMatchEnd;
|
||||
if (_MyItemInfo != null && _MyItemInfo.ActiveFormat != null && _MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.NoReplaceQuoteParenWords)
|
||||
pat = wordMatchBeg + @"(?<!\\u160\?|\\u8209\?|\\b|\-|""|'|\()" + replaceWord + @"(?!\\u160\?|\\u8209\?|\-|""|'|\))" + wordMatchEnd;
|
||||
dicReplaceRegex.Add(rs, new Regex(pat, myOptions));
|
||||
//ProfileTimer.Pop(profileDepth3);
|
||||
}
|
||||
|
Reference in New Issue
Block a user