From 89f2a58397c7d51995cfd9885d472e8b08de2c71 Mon Sep 17 00:00:00 2001 From: Rich Date: Fri, 23 Sep 2016 14:43:10 +0000 Subject: [PATCH] Step transitions to another Section were being output as Section 7.1.3 Step 7.1.3.g. This change causes the code to output Step 7.1.3.g. --- PROMS/VEPROMS.CSLA.Library/Extension/TransitionExt.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/TransitionExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/TransitionExt.cs index e9be667b..e4a6599d 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/TransitionExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/TransitionExt.cs @@ -754,6 +754,7 @@ namespace VEPROMS.CSLA.Library { return GetResolvedText(fromInfo.ActiveFormat, fromInfo, tranType, toItem, rangeItem, hasPageNum); } + private static Regex RegFixVCS = new Regex(@"Section ([0-9.]+) Step \1"); // Find Section xxx followed by Step xxx public static string GetResolvedText(FormatInfo formatInfo, ItemInfo fromInfo, int tranType, ItemInfo toItem, ItemInfo rangeItem, bool pagenum) { if (!pagenum) @@ -801,6 +802,7 @@ namespace VEPROMS.CSLA.Library if (toItem.MyDocVersion == null) return "?"; string retval = BuildString(tb); + if(tb._FromItem.ActiveFormat.Name.ToUpper().StartsWith("VCB")) retval = RegFixVCS.Replace(retval,"Step $1");//Remove the Section portion if the step portion repeats the section portion only for VCB // Added for transitions to un-numbered steps if (retval == string.Empty) {