-
-
Notifications
You must be signed in to change notification settings - Fork 589
Open
Labels
Description
Information
- OS: Windows
- Version: 0.48.0
- Terminal: Windows Terminal
Describe the bug
AnsiConsole.Write(string value)
is calling AnsiConsole.Write(String format, Object[] args)
this have some unexpected and undocumented behaviour:
- Call throws exceptions when string contains double braces and is not valid format string for
string.Format
- When the string could be valid format string and have single parameter like "test {0}" some internal data (Spectre.Console.Style) is passed to the format.
- When there is more than one format parameter like "test {0} {1}" it throws another Format exception.
To Reproduce
Just call AnsiConsole.Write("{")
or AnsiConsole.Write("test {0}")
or AnsiConsole.Write("test {0} {1}")
Expected behavior
String passed as parameter to AnsiConsole.Write
is just shown in console..
Please upvote 👍 this issue if you are interested in it.
scottbilas and codeconscious
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Todo 🕑