This commit is contained in:
@@ -19,23 +19,23 @@ namespace VEPROMS.CSLA.Library
|
||||
public void FixTransitionText(TransitionInfo tran)
|
||||
{
|
||||
string transText = tran.ResolvePathTo();
|
||||
string lookFor = string.Format(@"<START\]\\v0 ([^#]*?)\\v #Link:Transition[^:]*?:{0} {1}( [0-9]*){{1,2}}\[END>", tran.TranType, tran.TransitionID);
|
||||
string lookFor = string.Format(@"<START\](\\[^v \\]+)*\\v0(\\[^v \\]+)* ([^#]*?)(\\[^v \\]+)*\\v(\\[^v \\]+)* #Link:Transition[^:]*?:{0} {1}( [0-9]*){{1,2}}\[END>", tran.TranType, tran.TransitionID);
|
||||
//string lookFor = string.Format(@"<START\]\\v0 ([^#]*?)\\v #Link:Transition[^:]*?:{0} {1} [0-9]*\[END>", tran.TranType, tran.TransitionID);
|
||||
Match m = Regex.Match(Text, lookFor);
|
||||
if (m != null && m.Groups.Count > 1)
|
||||
{
|
||||
System.Text.RegularExpressions.Group g = m.Groups[1];
|
||||
System.Text.RegularExpressions.Group g = m.Groups[3];
|
||||
if (g.ToString() != transText)
|
||||
Text = Text.Substring(0, g.Index) + transText + Text.Substring(g.Index + g.Length);
|
||||
}
|
||||
}
|
||||
public void FixContentText(RoUsageInfo rousg, string newvalue)
|
||||
{
|
||||
string lookFor = string.Format(@"<START\]\\v0 (.*?)\\v #Link:ReferencedObject:{0} .*?\[END>", rousg.ROUsageID);
|
||||
string lookFor = string.Format(@"<START\](\\[^v \\]+)*\\v0(\\[^v \\]+)* (.*?)(\\[^v \\]+)*\\v(\\[^v \\]+)* #Link:ReferencedObject:{0} .*?\[END>", rousg.ROUsageID);
|
||||
Match m = Regex.Match(Text, lookFor);
|
||||
if (m != null && m.Groups.Count > 1)
|
||||
{
|
||||
System.Text.RegularExpressions.Group g = m.Groups[1];
|
||||
System.Text.RegularExpressions.Group g = m.Groups[3];
|
||||
if (g.ToString() != newvalue)
|
||||
Text = Text.Substring(0, g.Index) + newvalue + Text.Substring(g.Index + g.Length);
|
||||
}
|
||||
|
@@ -1039,9 +1039,11 @@ namespace VEPROMS.CSLA.Library
|
||||
retval = Regex.Replace(retval, @"\\ul ?", "");
|
||||
retval = Regex.Replace(retval, @"\\i0 ?", "");
|
||||
retval = Regex.Replace(retval, @"\\i ?", "");
|
||||
retval = Regex.Replace(retval, @"\\super ?", "");
|
||||
retval = Regex.Replace(retval, @"\\sub ?", "");
|
||||
retval = Regex.Replace(retval, @"\\nosupersub ?", "");
|
||||
//retval = Regex.Replace(retval, @"\\super ?", "");
|
||||
//retval = Regex.Replace(retval, @"\\sub ?", "");
|
||||
//retval = Regex.Replace(retval, @"\\nosupersub ?", "");
|
||||
retval = Regex.Replace(retval, @"\\up[30] ?", "");
|
||||
retval = Regex.Replace(retval, @"\\dn[30] ?", "");
|
||||
return retval;
|
||||
}
|
||||
private static string StripLinks(string rtf)
|
||||
|
Reference in New Issue
Block a user