This commit is contained in:
parent
74b17eb481
commit
cc4b8a2020
@ -382,7 +382,7 @@ namespace Volian.Controls.Library
|
||||
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;
|
||||
string retstr = text;
|
||||
for (int i = matches.Count - 1; i >= 0; i--)
|
||||
{
|
||||
Match m = matches[i];
|
||||
@ -395,8 +395,8 @@ namespace Volian.Controls.Library
|
||||
if (m.Groups[7].Value != "" && StepTransition(int.Parse(m.Groups[7].Value)))
|
||||
{
|
||||
System.Text.RegularExpressions.Group g = m.Groups[3];
|
||||
string beforeTran = text.Substring(0, g.Index);
|
||||
string afterTran = text.Substring(g.Index + g.Length);
|
||||
string beforeTran = retstr.Substring(0, g.Index);
|
||||
string afterTran = retstr.Substring(g.Index + g.Length);
|
||||
string newvalue = g.ToString();
|
||||
int indexLastSpace = newvalue.LastIndexOf(' ');
|
||||
if (indexLastSpace >= 0)
|
||||
@ -409,7 +409,6 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
}
|
||||
}
|
||||
if (retstr == null) return text; // no transition processing occurred, just return original string.
|
||||
return retstr;
|
||||
}
|
||||
private string ReplaceLastSpaceWithHardSpace(string str)
|
||||
|
Loading…
x
Reference in New Issue
Block a user