diff --git a/src/Markdig/Helpers/LinkHelper.cs b/src/Markdig/Helpers/LinkHelper.cs index fd7e6ba2..b0058ad4 100644 --- a/src/Markdig/Helpers/LinkHelper.cs +++ b/src/Markdig/Helpers/LinkHelper.cs @@ -60,12 +60,12 @@ public static string Urilize(ReadOnlySpan headingText, bool allowOnlyAscii } else { - normalized = allowOnlyAscii ? CharNormalizer.ConvertToAscii(c) : null; + normalized = allowOnlyAscii ? CharNormalizer.ConvertToAscii(c) : ReadOnlySpan.Empty; } for (int j = 0; j < (normalized.Length < 1 ? 1 : normalized.Length); j++) { - if (normalized != null) + if (!normalized.IsEmpty) { c = normalized[j]; }