1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 18:42:56 +08:00

Merge branch 'master' into osu-random-mod-improvements

This commit is contained in:
Henry Lin 2021-07-13 20:39:23 +08:00 committed by GitHub
commit 94dc25837f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 0 deletions

View File

@ -95,6 +95,15 @@ _**italic with underscore, bold with asterisk**_";
});
}
[Test]
public void TestAutoLink()
{
AddStep("Add autolink", () =>
{
markdownContainer.Text = "<https://discord.gg/ppy>";
});
}
[Test]
public void TestInlineCode()
{

View File

@ -26,6 +26,12 @@ namespace osu.Game.Graphics.Containers.Markdown
title = linkInline.Title;
}
public OsuMarkdownLinkText(AutolinkInline autolinkInline)
: base(autolinkInline)
{
text = autolinkInline.Url;
}
[BackgroundDependencyLoader]
private void load()
{

View File

@ -17,6 +17,9 @@ namespace osu.Game.Graphics.Containers.Markdown
protected override void AddLinkText(string text, LinkInline linkInline)
=> AddDrawable(new OsuMarkdownLinkText(text, linkInline));
protected override void AddAutoLink(AutolinkInline autolinkInline)
=> AddDrawable(new OsuMarkdownLinkText(autolinkInline));
protected override void AddImage(LinkInline linkInline) => AddDrawable(new OsuMarkdownImage(linkInline));
// TODO : Change font to monospace