Fix comment markdown image not showing tooltips

This commit is contained in:
Joseph Madamba 2023-11-15 19:41:13 -08:00
parent 2b19cf6ce4
commit dc2d574965
2 changed files with 5 additions and 5 deletions

View File

@ -64,7 +64,7 @@ public void TestComment(string description, string text)
new[] { "Plain", "This is plain comment" },
new[] { "Pinned", "This is pinned comment" },
new[] { "Link", "Please visit https://osu.ppy.sh" },
new[] { "Big Image", "![](Backgrounds/bg1)" },
new[] { "Big Image", "![](Backgrounds/bg1 \"Big Image\")" },
new[] { "Small Image", "![](Cursor/cursortrail)" },
new[]
{

View File

@ -51,12 +51,12 @@ protected override float GetFontSizeByLevel(int level)
private partial class CommentMarkdownTextFlowContainer : OsuMarkdownTextFlowContainer
{
protected override void AddImage(LinkInline linkInline) => AddDrawable(new CommentMarkdownImage(linkInline.Url));
protected override void AddImage(LinkInline linkInline) => AddDrawable(new CommentMarkdownImage(linkInline));
private partial class CommentMarkdownImage : MarkdownImage
private partial class CommentMarkdownImage : OsuMarkdownImage
{
public CommentMarkdownImage(string url)
: base(url)
public CommentMarkdownImage(LinkInline linkInline)
: base(linkInline)
{
}