Browse Source

处理子集相同字段标签

lichunlei 3 months ago
parent
commit
8468ad8dde
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Util/Maker.cs

+ 2 - 2
Util/Maker.cs

@@ -110,7 +110,7 @@ namespace Util
                                         itemString = itemString.Replace(subLoop.Value, "${tag" + index + "}$");
                                         replaceDict.Add("tag" + index, subLoop.Value);
                                     }
-                                    MatchCollection subLoops = Regex.Matches(itemString, "<<ym-item:.*?>>[\\s\\S]*?<</ym-item:.*?>>");
+                                    subLoops = Regex.Matches(itemString, "<<ym-item:.*?>>[\\s\\S]*?<</ym-item:.*?>>");
                                     foreach (Match subLoop in subLoops)
                                     {
                                         index += 1;
@@ -194,7 +194,7 @@ namespace Util
                                     itemString = itemString.Replace(subLoop.Value, "${tag" + index + "}$");
                                     replaceDict.Add("tag" + index, subLoop.Value);
                                 }
-                                MatchCollection subLoops = Regex.Matches(itemString, "<<ym-item:.*?>>[\\s\\S]*?<</ym-item:.*?>>");
+                                subLoops = Regex.Matches(itemString, "<<ym-item:.*?>>[\\s\\S]*?<</ym-item:.*?>>");
                                 foreach (Match subLoop in subLoops)
                                 {
                                     index += 1;