This commit is contained in:
@@ -381,6 +381,8 @@ namespace Volian.Controls.Library
|
||||
string strippedText = StaticStripRtfCommands(text);
|
||||
string lookFor = string.Format(@"<START\](\\[^v \\]+)*\\v0(\\[^v \\]+)* (.*?)(\\[^v \\]+)*\\v(\\[^v \\]+)* #Link:(ReferencedObject|Transition[^:]*?):[0-9]* ([0-9]*).*?\[END>");
|
||||
MatchCollection matches = Regex.Matches(text, lookFor);
|
||||
if (matches.Count == 0) return text;
|
||||
string retstr = null;
|
||||
for (int i = matches.Count - 1; i >= 0; i--)
|
||||
{
|
||||
Match m = matches[i];
|
||||
@@ -398,16 +400,17 @@ namespace Volian.Controls.Library
|
||||
string newvalue = g.ToString();
|
||||
int indexLastSpace = newvalue.LastIndexOf(' ');
|
||||
if (indexLastSpace >= 0)
|
||||
text = beforeTran + newvalue.Substring(0, indexLastSpace) + @"\u160?" + newvalue.Substring(indexLastSpace + 1) + afterTran;
|
||||
retstr = beforeTran + newvalue.Substring(0, indexLastSpace) + @"\u160?" + newvalue.Substring(indexLastSpace + 1) + afterTran;
|
||||
else
|
||||
if (beforeTran.EndsWith(" ") )
|
||||
text = ReplaceLastSpaceWithHardSpace(beforeTran) + newvalue + afterTran;
|
||||
retstr = ReplaceLastSpaceWithHardSpace(beforeTran) + newvalue + afterTran;
|
||||
else
|
||||
Console.Write("");// Don't know where to put the Hard Space
|
||||
}
|
||||
}
|
||||
}
|
||||
return text;
|
||||
if (retstr == null) return text; // no transition processing occurred, just return original string.
|
||||
return retstr;
|
||||
}
|
||||
private string ReplaceLastSpaceWithHardSpace(string str)
|
||||
{
|
||||
|
Reference in New Issue
Block a user