mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-03-29 01:45:28 +00:00
Add localization (#1482)
Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
using System.Linq;
|
||||
using Markdig.Syntax.Inlines;
|
||||
using MarkdownInline = Markdig.Syntax.Inlines.Inline;
|
||||
|
||||
namespace DiscordChatExporter.Gui.Utils.Extensions;
|
||||
|
||||
internal static class MarkdigExtensions
|
||||
{
|
||||
extension(MarkdownInline inline)
|
||||
{
|
||||
public string GetInnerText() =>
|
||||
inline switch
|
||||
{
|
||||
LiteralInline literal => literal.Content.ToString(),
|
||||
ContainerInline container => string.Concat(container.Select(c => c.GetInnerText())),
|
||||
_ => string.Empty,
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user