Enable nullable reference types

Closes #36
This commit is contained in:
Patrik Svensson
2020-08-11 17:15:58 +02:00
committed by Patrik Svensson
parent a273f74758
commit 5d132220ba
25 changed files with 98 additions and 72 deletions

View File

@ -6,7 +6,7 @@ namespace Spectre.Console.Internal
{
internal static class MarkupParser
{
public static Text Parse(string text, Style style = null)
public static Text Parse(string text, Style? style = null)
{
style ??= Style.Plain;
@ -18,6 +18,10 @@ namespace Spectre.Console.Internal
while (tokenizer.MoveNext())
{
var token = tokenizer.Current;
if (token == null)
{
break;
}
if (token.Kind == MarkupTokenKind.Open)
{