New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Input string was not in a correct format" error with AnsiConsole.Write()
#1495
Labels
Comments
In this case the |
Thanks for the tip! Indeed, I confirmed that this workaround for var text = @"{{Pt.1}} (TEST ~ 855D)";
AnsiConsole.WriteLine(text);
AnsiConsole.WriteLine(text.EscapeMarkup());
AnsiConsole.Write(text + Environment.NewLine);
AnsiConsole.Write(text.EscapeMarkup() + Environment.NewLine); Output:
|
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Information
Describe the bug
A string containing the text
{Pt.1} (TEST ~ 855D)
causesAnsiConsole.Write()
to throw the following exception:Interestingly, this does not occur with
AnsiConsole.WriteLine()
. Also, usingEscapeMarkup()
on the string does not resolve the issue.Similarly-formatted strings behave identically. I believe it's likely some of the text is unexpectedly being treated as markup.
I hope this is information is sufficient. Please let me know if you need anything more or if perhaps I'm overlooking anything (including a potential workaround). Thank you much.
To Reproduce
Expected behavior
All lines written successfully to the terminal with markup-like text not treated as markup.
Screenshots
None.
Additional context
None.
Please upvote 👍 this issue if you are interested in it.
The text was updated successfully, but these errors were encountered: