mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2025-05-29 22:15:18 -04:00
[CLI] Move Markup.Escape(...) to ConsoleExtensions
This commit is contained in:
parent
0ec6027a93
commit
021682899a
2 changed files with 6 additions and 3 deletions
|
@ -14,7 +14,6 @@ using DiscordChatExporter.Core.Exceptions;
|
||||||
using DiscordChatExporter.Core.Exporting;
|
using DiscordChatExporter.Core.Exporting;
|
||||||
using DiscordChatExporter.Core.Exporting.Partitioning;
|
using DiscordChatExporter.Core.Exporting.Partitioning;
|
||||||
using DiscordChatExporter.Core.Utils.Extensions;
|
using DiscordChatExporter.Core.Utils.Extensions;
|
||||||
using Spectre.Console;
|
|
||||||
using Tyrrrz.Extensions;
|
using Tyrrrz.Extensions;
|
||||||
|
|
||||||
namespace DiscordChatExporter.Cli.Commands.Base
|
namespace DiscordChatExporter.Cli.Commands.Base
|
||||||
|
@ -65,7 +64,7 @@ namespace DiscordChatExporter.Cli.Commands.Base
|
||||||
// Export
|
// Export
|
||||||
try
|
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);
|
var guild = await Discord.GetGuildAsync(channel.GuildId);
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,11 @@ namespace DiscordChatExporter.Cli.Utils.Extensions
|
||||||
string description,
|
string description,
|
||||||
Func<ProgressTask, ValueTask> performOperationAsync)
|
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
|
try
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue