F2023-029 fixed issue where the ending double quote after the section title was removed when using a transition type that does not include an optional step number.

This commit is contained in:
John Jenko 2023-02-22 18:40:53 +00:00
parent b447124d2c
commit aa63726dcc

View File

@ -920,7 +920,20 @@ namespace VEPROMS.CSLA.Library
tb.Append("\\" + token.Substring(0, token.Length - 1) + "\\}"); tb.Append("\\" + token.Substring(0, token.Length - 1) + "\\}");
startIndex = rexEndToken + 1; startIndex = rexEndToken + 1;
prevToken = token; prevToken = token;
if (startIndex >= tb._TransFormat.Length) break; if (startIndex >= tb._TransFormat.Length)
{
// 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)
{
if (prefix.EndsWith(", Step\xA0"))
prefix = prefix.Remove(prefix.LastIndexOf(", Step\xA0"));
prefix = prefix.Trim();
if (prefix.Length > 0)
tb.Append(prefix);
}
break; // jump put of the foreach loop
}
} }
if ((startIndex < tb._TransFormat.Length) && lastAdded) tb.Append(tb._TransFormat.Substring(startIndex, tb._TransFormat.Length - startIndex)); if ((startIndex < tb._TransFormat.Length) && lastAdded) tb.Append(tb._TransFormat.Substring(startIndex, tb._TransFormat.Length - startIndex));
string myReturn = Regex.Replace(tb.ToString(), @"\.+", "."); string myReturn = Regex.Replace(tb.ToString(), @"\.+", ".");