Allow markup in selection prompts

Closes #221
This commit is contained in:
Patrik Svensson
2021-03-14 23:09:17 +01:00
committed by Phil Scott
parent 57a8e6ccc1
commit 9502aaf2b9
5 changed files with 66 additions and 6 deletions

View File

@ -25,6 +25,22 @@ namespace Spectre.Console.Tests.Unit
}
}
public sealed class TheRemoveMethod
{
[Theory]
[InlineData("Hello World", "Hello World")]
[InlineData("Hello [blue]World", "Hello World")]
[InlineData("Hello [blue]World[/]", "Hello World")]
public void Should_Remove_Markup_From_Text(string input, string expected)
{
// Given, When
var result = Markup.Remove(input);
// Then
result.ShouldBe(expected);
}
}
[Theory]
[InlineData("Hello [[ World ]")]
[InlineData("Hello [[ World ] !")]