|
|
@@ -103,7 +103,14 @@ namespace Util
|
|
|
{
|
|
|
Dictionary<string, string> replaceDict = new Dictionary<string, string>();
|
|
|
int index = 0;
|
|
|
- MatchCollection subLoops = Regex.Matches(itemString, "<<.*?>>");
|
|
|
+ MatchCollection subLoops = Regex.Matches(itemString, "<<ym-loop:.*?>>[\\s\\S]*?<</ym-loop:.*?>>");
|
|
|
+ foreach (Match subLoop in subLoops)
|
|
|
+ {
|
|
|
+ index += 1;
|
|
|
+ itemString = itemString.Replace(subLoop.Value, "${tag" + index + "}$");
|
|
|
+ replaceDict.Add("tag" + index, subLoop.Value);
|
|
|
+ }
|
|
|
+ MatchCollection subLoops = Regex.Matches(itemString, "<<ym-item:.*?>>[\\s\\S]*?<</ym-item:.*?>>");
|
|
|
foreach (Match subLoop in subLoops)
|
|
|
{
|
|
|
index += 1;
|
|
|
@@ -180,11 +187,18 @@ namespace Util
|
|
|
{
|
|
|
Dictionary<string, string> replaceDict = new Dictionary<string, string>();
|
|
|
int index = 0;
|
|
|
- MatchCollection subLoops = Regex.Matches(itemString, "<<.*?>>");
|
|
|
+ MatchCollection subLoops = Regex.Matches(itemString, "<<ym-loop:.*?>>[\\s\\S]*?<</ym-loop:.*?>>");
|
|
|
+ foreach (Match subLoop in subLoops)
|
|
|
+ {
|
|
|
+ index += 1;
|
|
|
+ itemString = itemString.Replace(subLoop.Value, "${tag" + index + "}$");
|
|
|
+ replaceDict.Add("tag" + index, subLoop.Value);
|
|
|
+ }
|
|
|
+ MatchCollection subLoops = Regex.Matches(itemString, "<<ym-item:.*?>>[\\s\\S]*?<</ym-item:.*?>>");
|
|
|
foreach (Match subLoop in subLoops)
|
|
|
{
|
|
|
index += 1;
|
|
|
- itemString = Regex.Replace(itemString, subLoop.Value, "${tag" + index + "}$");
|
|
|
+ itemString = itemString.Replace(subLoop.Value, "${tag" + index + "}$");
|
|
|
replaceDict.Add("tag" + index, subLoop.Value);
|
|
|
}
|
|
|
itemString = itemString.Replace("<<" + itemKey + ">>", itemObj.ToString());
|