diff --git a/PROMS/Volian.Controls.Library/DisplayText.cs b/PROMS/Volian.Controls.Library/DisplayText.cs index 58753d46..3070226a 100644 --- a/PROMS/Volian.Controls.Library/DisplayText.cs +++ b/PROMS/Volian.Controls.Library/DisplayText.cs @@ -1915,6 +1915,20 @@ namespace Volian.Controls.Library with = with.Replace(@"\ul ", ""); with = with.Replace(@"\ulnone ", ""); } + string preceedingText = text.Substring(0, offset + foundMatch.MyMatch.Index); + int ndxBold = preceedingText.LastIndexOf(@"\b"); + if (ndxBold > -1 && preceedingText[ndxBold + 2] != '0' && with.Contains(@"\b ")) + { + with = with.Replace(@"\b ",""); + with = with.Replace(@"\b0 ",""); + } + int ndxULine = preceedingText.LastIndexOf(@"\ul"); + if (ndxULine > -1 && preceedingText[ndxULine + 2] != 'n' && with.Contains(@"\ul ")) + { + with = with.Replace(@"\ul ", ""); + with = with.Replace(@"\ulnone ", ""); + } + text = text.Substring(0, offset + foundMatch.MyMatch.Index) + with + text.Substring(offset + foundMatch.MyMatch.Index + foundMatch.MyMatch.Length); //offset += foundMatch.MyWord.ReplaceWith.Length - foundMatch.MyMatch.Length; offset += with.Length - foundMatch.MyMatch.Length; diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 6c0d14c5..ab01b1c0 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -1365,6 +1365,7 @@ namespace Volian.Print.Library while (useParaForTab.MyItemInfo.IsInRNO) { concatrnoTab = (useParaForTab.MyTab != null ? useParaForTab.MyTab.Text.TrimEnd() : "") + concatrnoTab.Trim(); + if (concatrnoTab.Length > 0 && concatrnoTab[0] > '\xff') concatrnoTab = ""; useRnoParaForTab = useParaForTab; useParaForTab = useParaForTab.MyParent; }