Hyphen immediately following an RTF token should add a space to terminate the RTF Token
Added Error Location to Error Log
This commit is contained in:
parent
ce776ace0e
commit
fc95275902
@ -168,11 +168,18 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
// Replace Hard Hyphens with normal hyphen so the PDF search for hyphens will work properly
|
// Replace Hard Hyphens with normal hyphen so the PDF search for hyphens will work properly
|
||||||
if (text.Contains(@"\u8209?") && epMode == E_EditPrintMode.Print)
|
if (text.Contains(@"\u8209?") && epMode == E_EditPrintMode.Print)
|
||||||
|
{
|
||||||
|
// Handle RTF Tokens followed immediately by a hard hyphen
|
||||||
|
text =Regex.Replace(text, @"(?<=\\[^\\?' \r\n\t]+)\\u8209\?", " -");
|
||||||
text = text.Replace(@"\u8209?", "-");
|
text = text.Replace(@"\u8209?", "-");
|
||||||
|
}
|
||||||
|
_MyStaticItemInfo = _MyItemInfo;
|
||||||
text = CreateRtf(colorLinks, text, tableShouldBeOutlined, wordsShouldBeReplaced, numbersShouldBeFormated, tableHasBorder, ROsShouldBeAdjusted, underlineAfterDashSpace);
|
text = CreateRtf(colorLinks, text, tableShouldBeOutlined, wordsShouldBeReplaced, numbersShouldBeFormated, tableHasBorder, ROsShouldBeAdjusted, underlineAfterDashSpace);
|
||||||
|
_MyStaticItemInfo = null;
|
||||||
StartText = text;
|
StartText = text;
|
||||||
ProfileTimer.Pop(profileDepth);
|
ProfileTimer.Pop(profileDepth);
|
||||||
}
|
}
|
||||||
|
private static ItemInfo _MyStaticItemInfo = null; // Used to report errors
|
||||||
private string ReplaceLinesWithUnicode(string text)
|
private string ReplaceLinesWithUnicode(string text)
|
||||||
{
|
{
|
||||||
text = text.Replace("\x2500", @"\u9472?"); // Horizontal
|
text = text.Replace("\x2500", @"\u9472?"); // Horizontal
|
||||||
@ -1142,7 +1149,11 @@ namespace Volian.Controls.Library
|
|||||||
if (token == "\\viewkind4 ") break;
|
if (token == "\\viewkind4 ") break;
|
||||||
if (Regex.IsMatch(token, @"^\\v0? ?$"))
|
if (Regex.IsMatch(token, @"^\\v0? ?$"))
|
||||||
return token; // comment part of link
|
return token; // comment part of link
|
||||||
_MyLog.WarnFormat("<<<ERROR>>>\r\n==> Token including Comment not processed '{0}'", token);
|
// If possible show what procedure was being processed.
|
||||||
|
if(_MyStaticItemInfo == null)
|
||||||
|
_MyLog.WarnFormat("<<<ERROR>>>\r\n==> Token including Comment not processed '{0}'", token);
|
||||||
|
else
|
||||||
|
_MyLog.WarnFormat("<<<ERROR>>>\r\n==> Token including Comment not processed '{0}' in {1},[{2}]", token, _MyStaticItemInfo.ShortPath, _MyStaticItemInfo.ItemID);
|
||||||
break;
|
break;
|
||||||
case 'l':
|
case 'l':
|
||||||
if (Regex.IsMatch(token, @"^\\line ?$")) return token;
|
if (Regex.IsMatch(token, @"^\\line ?$")) return token;
|
||||||
@ -1484,6 +1495,7 @@ namespace Volian.Controls.Library
|
|||||||
if (Regex.IsMatch(mynum, @".*\\'[A-Fa-f0-9]{2,2}$"))
|
if (Regex.IsMatch(mynum, @".*\\'[A-Fa-f0-9]{2,2}$"))
|
||||||
ind -= 4;
|
ind -= 4;
|
||||||
units = prevValue.Substring(ind+1);
|
units = prevValue.Substring(ind+1);
|
||||||
|
//if (rtnstr.EndsWith(units) && units != "")
|
||||||
if (rtnstr.EndsWith(units))
|
if (rtnstr.EndsWith(units))
|
||||||
{
|
{
|
||||||
rtnstr = rtnstr.Replace(units, "");
|
rtnstr = rtnstr.Replace(units, "");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user