From dbc16f9f6381c3ed97160cd2c7d45eca44cfb651 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 24 Feb 2026 16:38:24 +0000 Subject: [PATCH] Render HyperLink for all links; allow any valid URI scheme Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com> --- .../Converters/MarkdownToInlinesConverter.cs | 2 +- DiscordChatExporter.Gui/Views/Controls/HyperLink.axaml.cs | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/DiscordChatExporter.Gui/Converters/MarkdownToInlinesConverter.cs b/DiscordChatExporter.Gui/Converters/MarkdownToInlinesConverter.cs index 9e50f3a3..ba5b66fd 100644 --- a/DiscordChatExporter.Gui/Converters/MarkdownToInlinesConverter.cs +++ b/DiscordChatExporter.Gui/Converters/MarkdownToInlinesConverter.cs @@ -79,7 +79,7 @@ public class MarkdownToInlinesConverter : IValueConverter break; } - case LinkInline link when !string.IsNullOrWhiteSpace(link.Url): + case LinkInline link: { inlines.Add( new InlineUIContainer( diff --git a/DiscordChatExporter.Gui/Views/Controls/HyperLink.axaml.cs b/DiscordChatExporter.Gui/Views/Controls/HyperLink.axaml.cs index 53084e95..31bd84b8 100644 --- a/DiscordChatExporter.Gui/Views/Controls/HyperLink.axaml.cs +++ b/DiscordChatExporter.Gui/Views/Controls/HyperLink.axaml.cs @@ -59,9 +59,7 @@ public partial class HyperLink : UserControl Command.Execute(CommandParameter); } else if ( - !string.IsNullOrWhiteSpace(Url) - && Uri.TryCreate(Url, UriKind.Absolute, out var uri) - && (uri.Scheme == Uri.UriSchemeHttp || uri.Scheme == Uri.UriSchemeHttps) + !string.IsNullOrWhiteSpace(Url) && Uri.TryCreate(Url, UriKind.Absolute, out var uri) ) { Process.StartShellExecute(uri.AbsoluteUri);