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:
copilot-swe-agent[bot]
2026-02-24 16:38:24 +00:00
parent 3daf49cb52
commit dbc16f9f63
2 changed files with 2 additions and 4 deletions

View File

@@ -79,7 +79,7 @@ public class MarkdownToInlinesConverter : IValueConverter
break;
}
case LinkInline link when !string.IsNullOrWhiteSpace(link.Url):
case LinkInline link:
{
inlines.Add(
new InlineUIContainer(

View File

@@ -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);