B2023-017 need more logic handle the turn off of the step number when there is text needed before the “, Step” text the we chop off.

This commit is contained in:
John Jenko 2023-02-23 13:57:10 +00:00
parent aa63726dcc
commit 21fc0f1b4e

View File

@ -924,10 +924,15 @@ namespace VEPROMS.CSLA.Library
{
// 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
if (prefix != null)
// B2023-017 added checks for Step followed by a regular space and if there isn't a space
if (prefix != null && prefix.Contains(", Step"))
{
if (prefix.EndsWith(", Step\xA0"))
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();
if (prefix.Length > 0)
tb.Append(prefix);