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.

This commit is contained in:
Rich 2018-05-02 15:17:57 +00:00
parent d3d4d51826
commit 56e8553571

View File

@ -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;
}