F2023-076: Transitions resolving with extra parens #17
@ -925,14 +925,31 @@ namespace VEPROMS.CSLA.Library
|
|||||||
// F2023-029 the prefix contains the ending quotes followed by the prefix text for a step number
|
// F2023-029 the prefix contains the ending quotes followed by the prefix text for a step number
|
||||||
// we need to strip off the prefix for the step number and append the text before it
|
// we need to strip off the prefix for the step number and append the text before it
|
||||||
// B2023-017 added checks for Step followed by a regular space and if there isn't a space
|
// B2023-017 added checks for Step followed by a regular space and if there isn't a space
|
||||||
if (prefix != null && prefix.Contains(", Step"))
|
// F2023-076 the changes (F2023-029 & B2023-017) caused an extra ')' to be put out in the PromsManual1 format
|
||||||
|
// The following code was modified to look for the quote that the Beaver Valley format uses and also adds
|
||||||
|
// code to fix when the step number is also included, i.e. when transition is to a section or procedure,
|
||||||
|
// don't include ', Step' but leave the quote, when transition is to a step remove quote too and the step
|
||||||
|
// with number gets added elsewhere
|
||||||
|
if (prefix != null && prefix.Contains("\", Step"))
|
||||||
{
|
{
|
||||||
if (prefix.EndsWith(", Step\xA0")) // sometimes ends with a hardspace when {Step} token is used
|
if (tb._ToItem.IsSection || tb._ToItem.IsProcedure)
|
||||||
prefix = prefix.Remove(prefix.LastIndexOf(", Step\xA0"));
|
{
|
||||||
if (prefix.EndsWith(", Step "))// sometimes ends with a normal space when {Step Number} token is used
|
if (prefix.EndsWith(", Step\xA0")) // sometimes ends with a hardspace when {Step} token is used
|
||||||
prefix = prefix.Remove(prefix.LastIndexOf(", Step "));
|
prefix = prefix.Remove(prefix.LastIndexOf(", Step\xA0"));
|
||||||
if (prefix.EndsWith(", Step"))// in case it doesn't end with any type of space
|
if (prefix.EndsWith(", Step "))// sometimes ends with a normal space when {Step Number} token is used
|
||||||
prefix = prefix.Remove(prefix.LastIndexOf(", Step"));
|
prefix = prefix.Remove(prefix.LastIndexOf(", Step "));
|
||||||
|
if (prefix.EndsWith(", Step"))// in case it doesn't end with any type of space
|
||||||
|
prefix = prefix.Remove(prefix.LastIndexOf(", Step"));
|
||||||
|
}
|
||||||
|
else // transition to is a step, remove the ending quote along with word 'Step' that would appear at end of step.
|
||||||
|
{
|
||||||
|
if (prefix.EndsWith("\", Step\xA0")) // sometimes ends with a hardspace when {Step} token is used
|
||||||
|
prefix = prefix.Remove(prefix.LastIndexOf("\", Step\xA0"));
|
||||||
|
if (prefix.EndsWith("\", Step "))// sometimes ends with a normal space when {Step Number} token is used
|
||||||
|
prefix = prefix.Remove(prefix.LastIndexOf("\", Step "));
|
||||||
|
if (prefix.EndsWith("\", Step"))// in case it doesn't end with any type of space
|
||||||
|
prefix = prefix.Remove(prefix.LastIndexOf("\", Step"));
|
||||||
|
}
|
||||||
prefix = prefix.Trim();
|
prefix = prefix.Trim();
|
||||||
if (prefix.Length > 0)
|
if (prefix.Length > 0)
|
||||||
tb.Append(prefix);
|
tb.Append(prefix);
|
||||||
@ -1276,7 +1293,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
string tmpStr = tb.ToString();
|
string tmpStr = tb.ToString();
|
||||||
if (tmpStr.ToUpper().EndsWith(", STEP "))
|
if (tmpStr.ToUpper().EndsWith(", STEP "))
|
||||||
tb.Remove(tb.Length - 7, 7); // 7 is length of ", Step "
|
tb.Remove(tb.Length - 7, 7); // 7 is length of ", Step "
|
||||||
else if (tb.Prefix != null && tb.Prefix.StartsWith(")") && (tb.ToString().IndexOf("(")>-1))
|
else if (tb.Prefix != null && tb.Prefix.StartsWith(")") && (tb.ToString().IndexOf("(") > -1))
|
||||||
tb.Append(")");
|
tb.Append(")");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user