mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-06-19 21:38:16 +08: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
@ -8,7 +8,6 @@ namespace Spectre.Console.Enrichment
|
||||
{
|
||||
private static readonly List<IProfileEnricher> _defaultEnrichers = new List<IProfileEnricher>
|
||||
{
|
||||
new WindowsTerminalEnricher(),
|
||||
new AppVeyorEnricher(),
|
||||
new BambooEnricher(),
|
||||
new BitbucketEnricher(),
|
||||
|
@ -1,19 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Spectre.Console.Enrichment
|
||||
{
|
||||
internal sealed class WindowsTerminalEnricher : IProfileEnricher
|
||||
{
|
||||
public string Name => "Windows Terminal";
|
||||
|
||||
public bool Enabled(IDictionary<string, string> environmentVariables)
|
||||
{
|
||||
return environmentVariables.ContainsKey("WT_SESSION");
|
||||
}
|
||||
|
||||
public void Enrich(Profile profile)
|
||||
{
|
||||
profile.Capabilities.Links = true;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user