瀏覽代碼

SQUASH: feat(xtintin): 增加一个通用的解析服务器表格的工具 re.ParseServerTable

本次更新主要是过滤掉了可选的 group 字段
dzp 4 周之前
父節點
當前提交
b087ac0eb7
共有 1 個文件被更改,包括 5 次插入3 次删除
  1. 5 3
      plugins/lib/xtintin/regex.tin

+ 5 - 3
plugins/lib/xtintin/regex.tin

@@ -114,8 +114,10 @@ VAR {服务器渲染的表格数据}  gServerTable   {};
             #local colorBody[$field] {$b};
         };
 
-        #local body[group] {$gServerTable.helper[group]};
-        #local colorBody[group] {$gServerTable.helper[colorGroup]};
+        #if { "$gServerTable.helper[group]" != "" } {
+            #local body[group] {$gServerTable.helper[group]};
+            #local colorBody[group] {$gServerTable.helper[colorGroup]};
+        };
 
         #list gServerTable[body] add {{$body}};
         #list gServerTable[colorBody] add {{$colorBody}};
@@ -130,7 +132,7 @@ VAR {服务器渲染的表格数据}  gServerTable   {};
         #var gServerTable[note] {};
     };
 
-    #action {{*UTF8}{?:^}╰─{?:(?:─|┴)+}{\p{Han}+}{?:(?:─|┴)+}─╯{|re/ParseServerTable/body}$} {
+    #action {{*UTF8}{?:^}╰─{?:(?:─|┴)+}{(|\p{So})\p{Han}+(|\p{So})}{?:(?:─|┴)+}─╯{|re/ParseServerTable/body}$} {
         #class re.ParseServerTable kill;
 
         #if { "$gServerTable.helper[gag]" == "gag" } {