mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-01-29 06:10:54 +00:00
[CLI] Move Markup.Escape(...) to ConsoleExtensions
This commit is contained in:
@@ -14,7 +14,6 @@ using DiscordChatExporter.Core.Exceptions;
|
||||
using DiscordChatExporter.Core.Exporting;
|
||||
using DiscordChatExporter.Core.Exporting.Partitioning;
|
||||
using DiscordChatExporter.Core.Utils.Extensions;
|
||||
using Spectre.Console;
|
||||
using Tyrrrz.Extensions;
|
||||
|
||||
namespace DiscordChatExporter.Cli.Commands.Base
|
||||
@@ -65,7 +64,7 @@ namespace DiscordChatExporter.Cli.Commands.Base
|
||||
// Export
|
||||
try
|
||||
{
|
||||
await progressContext.StartTaskAsync(Markup.Escape($"{channel.Category} / {channel.Name}"), async progress =>
|
||||
await progressContext.StartTaskAsync($"{channel.Category} / {channel.Name}", async progress =>
|
||||
{
|
||||
var guild = await Discord.GetGuildAsync(channel.GuildId);
|
||||
|
||||
|
||||
@@ -33,7 +33,11 @@ namespace DiscordChatExporter.Cli.Utils.Extensions
|
||||
string description,
|
||||
Func<ProgressTask, ValueTask> performOperationAsync)
|
||||
{
|
||||
var progressTask = progressContext.AddTask(description, new ProgressTaskSettings {MaxValue = 1});
|
||||
var progressTask = progressContext.AddTask(
|
||||
// Don't recognize random square brackets as style tags
|
||||
Markup.Escape(description),
|
||||
new ProgressTaskSettings {MaxValue = 1}
|
||||
);
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user