mirror of
https://github.com/spectreconsole/spectre.console.git
synced 2026-01-02 01:03:32 +01:00
Change IAnsiConsole to render IRenderable
This makes it possible for encoders to output better representation of the actual objects instead of working with chopped up segments. * IAnsiConsole.Write now takes an IRenderable instead of segments * Calculating cell width does no longer require a render context * Removed RenderContext.LegacyConsole * Removed RenderContext.Encoding * Added Capabilities.Unicode
This commit is contained in:
committed by
Phil Scott
parent
2ba6da3514
commit
20650f1e7e
@@ -52,6 +52,7 @@ namespace Spectre.Console
|
||||
profile.Capabilities.Links = supportsAnsi && !legacyConsole;
|
||||
profile.Capabilities.Legacy = legacyConsole;
|
||||
profile.Capabilities.Interactive = interactive;
|
||||
profile.Capabilities.Unicode = encoding.EncodingName.ContainsExact("Unicode");
|
||||
|
||||
// Enrich the profile
|
||||
ProfileEnricher.Enrich(
|
||||
@@ -95,7 +96,7 @@ namespace Spectre.Console
|
||||
}
|
||||
else
|
||||
{
|
||||
// Try detecting whether or not this
|
||||
// Try detecting whether or not this is a legacy console
|
||||
(_, legacyConsole) = AnsiDetector.Detect(buffer.IsStandardError(), false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user