mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-06-19 21:38:16 +08:00
Fix the style parameter nullable annotation on AnsiConsoleExtensions
The style parameter is actually nullable. Also, the documentation of the style parameter has been made explicit that `Style.Plain` is used when a `null` style is passed.
This commit is contained in:

committed by
Patrik Svensson

parent
ffd24ec451
commit
786b7670da
@ -47,7 +47,7 @@ namespace Spectre.Console
|
||||
/// Initializes a new instance of the <see cref="Paragraph"/> class.
|
||||
/// </summary>
|
||||
/// <param name="text">The text.</param>
|
||||
/// <param name="style">The style of the text.</param>
|
||||
/// <param name="style">The style of the text or <see cref="Style.Plain"/> if <see langword="null"/>.</param>
|
||||
public Paragraph(string text, Style? style = null)
|
||||
: this()
|
||||
{
|
||||
@ -63,7 +63,7 @@ namespace Spectre.Console
|
||||
/// Appends some text to this paragraph.
|
||||
/// </summary>
|
||||
/// <param name="text">The text to append.</param>
|
||||
/// <param name="style">The style of the appended text.</param>
|
||||
/// <param name="style">The style of the appended text or <see cref="Style.Plain"/> if <see langword="null"/>.</param>
|
||||
/// <returns>The same instance so that multiple calls can be chained.</returns>
|
||||
public Paragraph Append(string text, Style? style = null)
|
||||
{
|
||||
|
@ -29,7 +29,7 @@ namespace Spectre.Console
|
||||
/// Initializes a new instance of the <see cref="Text"/> class.
|
||||
/// </summary>
|
||||
/// <param name="text">The text.</param>
|
||||
/// <param name="style">The style of the text.</param>
|
||||
/// <param name="style">The style of the text or <see cref="Style.Plain"/> if <see langword="null"/>.</param>
|
||||
public Text(string text, Style? style = null)
|
||||
{
|
||||
_paragraph = new Paragraph(text, style);
|
||||
|
Reference in New Issue
Block a user