fix some nullability issues

This commit is contained in:
Simon Cropp
2020-12-24 11:43:39 +11:00
committed by Patrik Svensson
parent 79742ce9e3
commit e71db7f78c
7 changed files with 6 additions and 25 deletions

View File

@@ -23,7 +23,7 @@ namespace Spectre.Console
/// </summary>
/// <param name="text">The text to escape.</param>
/// <returns>A string that is safe to use in markup.</returns>
public static string EscapeMarkup(this string text)
public static string EscapeMarkup(this string? text)
{
if (text == null)
{
@@ -45,7 +45,7 @@ namespace Spectre.Console
return Cell.GetCellLength(context, text);
}
internal static string Capitalize(this string text, CultureInfo? culture = null)
internal static string Capitalize(this string? text, CultureInfo? culture = null)
{
if (text == null)
{