Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ public partial class LocalizeSourceGenerator : IIncrementalGenerator
private static readonly Version PackageVersion = typeof(LocalizeSourceGenerator).Assembly.GetName().Version;

private static readonly ImmutableArray<LocalizableString> _emptyLocalizableStrings = ImmutableArray<LocalizableString>.Empty;
private static readonly ImmutableArray<LocalizableStringParam> _emptyLocalizableStringParams = ImmutableArray<LocalizableStringParam>.Empty;

#endregion

Expand Down Expand Up @@ -355,7 +354,8 @@ private static (string Summary, ImmutableArray<LocalizableStringParam> 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
Expand Down Expand Up @@ -385,7 +385,8 @@ private static (string Summary, ImmutableArray<LocalizableStringParam> 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());
}
}

Expand Down
Loading