From 953469475c59c86d8805175885932d50e92dc459 Mon Sep 17 00:00:00 2001 From: walon Date: Fri, 11 Feb 2022 18:09:24 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E6=97=A0=E6=B3=95=E8=AF=86=E5=88=AB=E7=BA=B5=E8=A1=A8?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=20##column#var=20=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Source/DataSources/Excel/SheetLoadUtil.cs | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/Luban.Job.Cfg/Source/DataSources/Excel/SheetLoadUtil.cs b/src/Luban.Job.Cfg/Source/DataSources/Excel/SheetLoadUtil.cs index c7c4b71..82a977f 100644 --- a/src/Luban.Job.Cfg/Source/DataSources/Excel/SheetLoadUtil.cs +++ b/src/Luban.Job.Cfg/Source/DataSources/Excel/SheetLoadUtil.cs @@ -81,13 +81,12 @@ namespace Luban.Job.Cfg.DataSources.Excel private static readonly HashSet s_knownSpecialTags = new HashSet { - "##var", - "##+", - "##type", - "##desc", - "##comment", - "##column", - "##", + "var", + "+", + "type", + "desc", + "comment", + "column", }; private const char s_sep = '#'; @@ -109,9 +108,13 @@ namespace Luban.Job.Cfg.DataSources.Excel { break; } - if (!s_knownSpecialTags.Contains(rowTag)) + var tags = rowTag.Substring(2).Split(s_sep).Where(s => !string.IsNullOrEmpty(s)); + foreach (string tag in tags) { - DefAssembly.LocalAssebmly?.Agent?.Error("文件:'{0}' 行标签:'{1}' 未知,是否有拼写错误?", s_curExcel.Value, rowTag); + if (!s_knownSpecialTags.Contains(tag)) + { + DefAssembly.LocalAssebmly?.Agent?.Error("文件:'{0}' 行标签:'{1}' 包含未知tag:'{2}',是否有拼写错误?", s_curExcel.Value, rowTag, tag); + } } } }