B2020-113 – Open curly brackets were sometimes replaced with “(![“
This commit is contained in:
parent
8733418b4e
commit
79d16a33a7
@ -1374,9 +1374,8 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
// replace \{ & \} with (![ & (!] respectively and then redo at end. The curly braces
|
||||
// are rtf so were getting removed and/or not handled correctly.
|
||||
string retval = rtf.Replace(@"\{", @" (![");
|
||||
retval = retval.Replace(@"\}", @" (!]");
|
||||
|
||||
string retval = rtf.Replace(@"\{", @"(!["); // B2020-113 don't have a space in the replacement string
|
||||
retval = retval.Replace(@"\}", @"(!]"); // B2020-113 don't have a space in the replacement string
|
||||
// remove carriage return/newlines after \par commands (these are introduced by rtb
|
||||
// for hard returns, goes into rtb as \par and comes out as \par\r\n):
|
||||
retval = reg1.Replace(retval, "\\par ");
|
||||
@ -1385,6 +1384,8 @@ namespace VEPROMS.CSLA.Library
|
||||
retval = reg3.Replace(retval, "$1"); // Strip Opening and Closing Braces
|
||||
retval = reg4.Replace(retval, ""); // Strip Clauses - remove anything from curly braces
|
||||
retval = reg5.Replace(retval, ""); // Strip Clauses - remove anything from curly braces
|
||||
retval = retval.Replace(@"(![", @"\{"); // B2020-113 put user entered open curly braces back in
|
||||
retval = retval.Replace(@"(!]", @"\}"); // B2020-113 put user entered close curly braces back in
|
||||
retval = reg6.Replace(retval, "$1 "); // add space after token if followed by token
|
||||
retval = reg7.Replace(retval, new MatchEvaluator(StaticReplaceRTFClause)); // take backslash xyz and evaluates them
|
||||
retval = reg8.Replace(retval, "$1"); // remove space between tokens
|
||||
@ -1406,8 +1407,6 @@ namespace VEPROMS.CSLA.Library
|
||||
if (retval.Length == 0) return "";
|
||||
if (retval.EndsWith(@"\v")) retval = retval.Remove(retval.Length - 2, 2);
|
||||
retval = _MyItemInfo.RemoveRtfStyles(retval); // RemoveRtfStyles(retval);
|
||||
retval = retval.Replace(@" (![", @"\{");
|
||||
retval = retval.Replace(@" (!]", @"\}");
|
||||
retval = retval.TrimEnd(' ');
|
||||
return retval;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user