restructured MarkupTokenizer a bit.

This commit is contained in:
Nils Andresen
2022-08-03 22:24:49 +02:00
committed by Patrik Svensson
parent 540bc1307c
commit 00a9ba325e
2 changed files with 123 additions and 90 deletions

View File

@ -141,5 +141,18 @@ public partial class AnsiConsoleTests
result.ShouldBeOfType<InvalidOperationException>()
.Message.ShouldBe("Encountered closing tag when none was expected near position 5.");
}
[Fact]
public void Should_Not_Get_Confused_When_Mixing_Escaped_And_Unescaped()
{
// Given
var console = new TestConsole();
// When
console.Markup("[grey][[grey]][/][white][[white]][/]");
// Then
console.Output.ShouldBe("[grey][white]");
}
}
}