1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 05:22:54 +08:00

Remove CommentMarkdownTextFlowContainer and rather use base-class OsuMarkdownTextFlowContainer

This commit is contained in:
basseX 2022-08-14 10:11:49 +02:00
parent b05acb0073
commit 932becc4b2

View File

@ -4,7 +4,6 @@
#nullable disable #nullable disable
using Markdig.Syntax; using Markdig.Syntax;
using Markdig.Syntax.Inlines;
using osu.Framework.Graphics.Containers.Markdown; using osu.Framework.Graphics.Containers.Markdown;
using osu.Game.Graphics.Containers.Markdown; using osu.Game.Graphics.Containers.Markdown;
@ -12,18 +11,10 @@ namespace osu.Game.Overlays.Comments
{ {
public class CommentMarkdownContainer : OsuMarkdownContainer public class CommentMarkdownContainer : OsuMarkdownContainer
{ {
public override MarkdownTextFlowContainer CreateTextFlow() => new CommentMarkdownTextFlowContainer(); public override MarkdownTextFlowContainer CreateTextFlow() => new OsuMarkdownTextFlowContainer();
protected override MarkdownHeading CreateHeading(HeadingBlock headingBlock) => new CommentMarkdownHeading(headingBlock); protected override MarkdownHeading CreateHeading(HeadingBlock headingBlock) => new CommentMarkdownHeading(headingBlock);
private class CommentMarkdownTextFlowContainer : OsuMarkdownTextFlowContainer
{
protected override void AddImage(LinkInline linkInline)
{
AddDrawable(new OsuMarkdownImage(linkInline));
}
}
private class CommentMarkdownHeading : OsuMarkdownHeading private class CommentMarkdownHeading : OsuMarkdownHeading
{ {
public CommentMarkdownHeading(HeadingBlock headingBlock) public CommentMarkdownHeading(HeadingBlock headingBlock)