确保所有字段都输出,包括空值

修复date和URL字段,确保所有字段都输出
与示例文件格式完全一致

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
yuuko 2025-11-24 15:55:41 +08:00
parent 7870366502
commit 4628be0343

View File

@ -89,11 +89,8 @@ namespace SlideCombine
// Subject行 // Subject行
result.AppendLine($"subject:{Subject}"); result.AppendLine($"subject:{Subject}");
// Date行 // Date行 - 即使为空也要输出
if (!string.IsNullOrEmpty(Date)) result.AppendLine($"date:{Date}");
{
result.AppendLine($"date:{Date}");
}
// Spatial行 - 即使为空也要输出 // Spatial行 - 即使为空也要输出
result.AppendLine($"spatial:{Spatial}"); result.AppendLine($"spatial:{Spatial}");
@ -101,17 +98,11 @@ namespace SlideCombine
// Other ISBN行 - 即使为空也要输出 // Other ISBN行 - 即使为空也要输出
result.AppendLine($"Other ISBN:{OtherISBN}"); result.AppendLine($"Other ISBN:{OtherISBN}");
// Other time行 // Other time行 - 即使为空也要输出
if (!string.IsNullOrEmpty(OtherTime)) result.AppendLine($"Other time:{OtherTime}");
{
result.AppendLine($"Other time:{OtherTime}");
}
// URL行 // URL行 - 即使为空也要输出
if (!string.IsNullOrEmpty(Url)) result.AppendLine($"url:{Url}");
{
result.AppendLine($"url:{Url}");
}
return result.ToString(); return result.ToString();
} }