Formats strings using a lightweight markup syntax and emits ANSI/VT sequences.
public sealed class AnsiMarkup
Supported syntax:
[red], [bold], [underline], [bold yellow on blue][/] closes the most recent tag (nesting is supported).[[ escapes a literal [, and ]] escapes a literal ].bright* variants (e.g. brightred, bright-red), plus #RRGGBB.on <color>, bg:<color>, or bg=<color>.kind:method, kind:property, kind:ctor. Press Esc to clear.AnsiMarkup(TextWriter, AnsiCapabilities?)Initializes a new instance of the AnsiMarkup class that writes to a TextWriter.AnsiMarkup(AnsiWriter, Dictionary<String, AnsiStyle>?)Initializes a new instance of the AnsiMarkup class that writes to an existing AnsiWriter and uses the specified custom style tokens.AnsiMarkup(IAnsiBasicWriter, Dictionary<String, AnsiStyle>?)Initializes a new instance of the AnsiMarkup class that writes to an existing IAnsiBasicWriter and uses the specified custom style tokens.AppendTo(AnsiWriter, ReadOnlySpan<Char>)Appends rendered markup to an existing AnsiWriter.AppendTo(IAnsiBasicWriter, ReadOnlySpan<Char>, Dictionary<String, AnsiStyle>?)Appends rendered markup to an existing IAnsiBasicWriter and uses the specified custom style tokens.Render(ref AnsiMarkupInterpolatedStringHandler, AnsiCapabilities?, Int32)Renders markup provided via an interpolated string and returns the resulting ANSI string.Write(ReadOnlySpan<Char>)Writes formatted markup to the underlying writer.Write(ref AnsiMarkupInterpolatedStringHandler)Writes formatted markup provided via an interpolated string to the underlying writer.WriteEscape(ReadOnlySpan<Char>)Writes the specified text verbatim, without interpreting markup.