mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-04-16 08:52:50 +08:00
Minor typo fixes
Hope this is helpful, cheers!
This commit is contained in:
parent
6a4d8c8f30
commit
9df6ed213c
@ -35,7 +35,7 @@ AnsiConsole.Write(table);
|
|||||||
|
|
||||||
## Convenience methods
|
## Convenience methods
|
||||||
|
|
||||||
There is also convenience methods on `AnsiConsole` that can be used
|
There are also convenience methods on `AnsiConsole` that can be used
|
||||||
to write markup text to the console without instantiating a new `Markup`
|
to write markup text to the console without instantiating a new `Markup`
|
||||||
instance.
|
instance.
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ AnsiConsole.Markup("[red]{0}[/]", Markup.Escape("Hello [World]"));
|
|||||||
|
|
||||||
## Escaping Interpolated Strings
|
## Escaping Interpolated Strings
|
||||||
|
|
||||||
When working with interpolated string, you can use the `MarkupInterpolated` and `MarkupLineInterpolated` methods to automatically escape the values in the interpolated string holes.
|
When working with interpolated strings, you can use the `MarkupInterpolated` and `MarkupLineInterpolated` methods to automatically escape the values in the interpolated string "holes".
|
||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
string hello = "Hello [World]";
|
string hello = "Hello [World]";
|
||||||
@ -75,8 +75,7 @@ AnsiConsole.MarkupInterpolated($"[red]{hello}[/]");
|
|||||||
|
|
||||||
## 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 `on`.
|
||||||
`on`.
|
|
||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
AnsiConsole.Markup("[bold yellow on blue]Hello[/]");
|
AnsiConsole.Markup("[bold yellow on blue]Hello[/]");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user