mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-06-19 13:28:16 +08:00
Add docs for escaping [ and ] in markup
This commit is contained in:
@ -37,6 +37,15 @@ AnsiConsole.Markup("[underline green]Hello[/] ");
|
|||||||
AnsiConsole.MarkupLine("[bold]World[/]");
|
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
|
# Setting background color
|
||||||
|
|
||||||
You can set the background color in markup by prefixing the color with
|
You can set the background color in markup by prefixing the color with
|
||||||
|
Reference in New Issue
Block a user