Skip to content

Commit 2e5257f

Browse files
committed
[O] 优化Maidata.cs的解析逻辑
1 parent 178664f commit 2e5257f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

maidata/Maidata.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ private void _putKey(string? key, StringBuilder content)
7272
var value = content.ToString();
7373
content.Clear();
7474
if (key == null) return;
75-
if (key.StartsWith("inote") || key.StartsWith("lv") || key.StartsWith("first") || key.StartsWith("wholebpm"))
75+
value = value.TrimEnd('\n'); // 字符串末尾的连续\n,说明是空白行,要去掉
76+
if (key.StartsWith("inote") || key.StartsWith("lv") || key == "first" || key == "wholebpm" ||
77+
key == "clock_count" || key.StartsWith("demo_") || key.StartsWith("ChartConvertTool"))
7678
value = value.Trim(); // 对部分字段,要trim一下;但不能对所有的字段都trim,比如如果对title进行trim,如月车站就寄了。
7779
this[key] = value;
7880
}

0 commit comments

Comments
 (0)