Add docs for escaping [ and ] in markup

This commit is contained in:
Patrik Svensson 2020-09-01 16:52:40 +02:00
parent 173645cdd2
commit a123806cd8

View File

@ -37,6 +37,15 @@ AnsiConsole.Markup("[underline green]Hello[/] ");
AnsiConsole.MarkupLine("[bold]World[/]");
```
# Escaping format characters
To output a `[` you use `[[`, and to output a `]` you use `]]`.
```csharp
AnsiConsole.Markup("[[Hello]] "); // [Hello]
AnsiConsole.Markup("[red][[World]][/]"); // [World]
```
# Setting background color
You can set the background color in markup by prefixing the color with