From 56e85535718bb31d2f4c1f3edeb84a43817f3b2b Mon Sep 17 00:00:00 2001 From: Rich Date: Wed, 2 May 2018 15:17:57 +0000 Subject: [PATCH] Code changed to exclude \u8209? (non-breaking hyphen) from consideration when looking to see if the space that is found is part of an RTF Command. --- PROMS/VEPROMS.CSLA.Library/Extension/DisplayText.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/DisplayText.cs b/PROMS/VEPROMS.CSLA.Library/Extension/DisplayText.cs index d0676dd5..228b66e3 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/DisplayText.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/DisplayText.cs @@ -283,7 +283,6 @@ namespace VEPROMS.CSLA.Library text = Regex.Replace(text, @"(?<=\\[^\\?' \r\n\t]+)\\u8209\?", " -"); text = text.Replace(@"\u8209?", "-"); } - // if in print mode, view mode, or non-active richtextbox do replace words. Only if in // actual edit mode are replace words left as is. // But don't do ReplaceWords if the TurnOffReplaceWords format flag is set @@ -663,7 +662,8 @@ namespace VEPROMS.CSLA.Library string Cmd = substring.Substring(startCmd); char tst = Cmd[1]; // consider rtf commands up/dn/b/ul/i - if (tst == 'u' || tst == 'd' || tst == 'b' || tst == 'u' || tst == 'i') return true; + // B2018-067 Added more specific comparison to eliminate \u8209? from consideration + if (Cmd.StartsWith("\\up") || tst == 'd' || tst == 'b' || Cmd.StartsWith("\\ul") || tst == 'i') return true; } return false; }