feature: subject presenter supports inline codeblock

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-04-25 13:24:13 +08:00
parent 9efbc7dd7a
commit 8c4362a98d
No known key found for this signature in database
7 changed files with 289 additions and 119 deletions

View file

@ -46,7 +46,7 @@ namespace SourceGit.Models
set => SetProperty(ref _urlTemplate, value);
}
public void Matches(List<Hyperlink> outs, string message)
public void Matches(List<InlineElement> outs, string message)
{
if (_regex == null || string.IsNullOrEmpty(_urlTemplate))
return;
@ -81,8 +81,7 @@ namespace SourceGit.Models
link = link.Replace($"${j}", group.Value);
}
var range = new Hyperlink(start, len, link);
outs.Add(range);
outs.Add(new InlineElement(InlineElementType.Link, start, len, link));
}
}