From 21fc0f1b4e20c460059876aef6f7566f7ff87f62 Mon Sep 17 00:00:00 2001 From: John Date: Thu, 23 Feb 2023 13:57:10 +0000 Subject: [PATCH] =?UTF-8?q?B2023-017=20need=20more=20logic=20handle=20the?= =?UTF-8?q?=20turn=20off=20of=20the=20step=20number=20when=20there=20is=20?= =?UTF-8?q?text=20needed=20before=20the=20=E2=80=9C,=20Step=E2=80=9D=20tex?= =?UTF-8?q?t=20the=20we=20chop=20off.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/VEPROMS.CSLA.Library/Extension/TransitionExt.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/TransitionExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/TransitionExt.cs index 55083f2d..4c87def4 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/TransitionExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/TransitionExt.cs @@ -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);