mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-06-14 11:26:33 +00:00
Render HyperLink for all links; allow any valid URI scheme
Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
This commit is contained in:
@@ -79,7 +79,7 @@ public class MarkdownToInlinesConverter : IValueConverter
|
||||
break;
|
||||
}
|
||||
|
||||
case LinkInline link when !string.IsNullOrWhiteSpace(link.Url):
|
||||
case LinkInline link:
|
||||
{
|
||||
inlines.Add(
|
||||
new InlineUIContainer(
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user