diff --git a/Flow.Launcher.Localization.SourceGenerators/Localize/LocalizeSourceGenerator.cs b/Flow.Launcher.Localization.SourceGenerators/Localize/LocalizeSourceGenerator.cs index 200ca95..3365a99 100644 --- a/Flow.Launcher.Localization.SourceGenerators/Localize/LocalizeSourceGenerator.cs +++ b/Flow.Launcher.Localization.SourceGenerators/Localize/LocalizeSourceGenerator.cs @@ -24,7 +24,6 @@ public partial class LocalizeSourceGenerator : IIncrementalGenerator private static readonly Version PackageVersion = typeof(LocalizeSourceGenerator).Assembly.GetName().Version; private static readonly ImmutableArray _emptyLocalizableStrings = ImmutableArray.Empty; - private static readonly ImmutableArray _emptyLocalizableStringParams = ImmutableArray.Empty; #endregion @@ -355,7 +354,8 @@ private static (string Summary, ImmutableArray Parameter { if (comment == null || comment.Value == null || parameters.Count == 0) { - return (null, _emptyLocalizableStringParams); + // If the comment is not a valid XML, the summary is null and the parameters are not updated + return (null, parameters.ToImmutableArray()); } try @@ -385,7 +385,8 @@ private static (string Summary, ImmutableArray Parameter } catch { - return (null, _emptyLocalizableStringParams); + // If the comment is not a valid XML, the summary is null and the parameters are not updated + return (null, parameters.ToImmutableArray()); } }