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