mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 18:27:26 +08:00
use ListBlock IsOrdered to determine ordered or unordered list
This commit is contained in:
parent
11d0f12455
commit
fc4fa4f696
@ -50,7 +50,7 @@ namespace osu.Game.Graphics.Containers.Markdown
|
||||
Padding = new MarginPadding(0)
|
||||
};
|
||||
|
||||
protected virtual OsuMarkdownListItem CreateListItem(ListItemBlock listItemBlock, int level) => new OsuMarkdownListItem(level, listItemBlock.Order);
|
||||
protected virtual OsuMarkdownListItem CreateListItem(ListItemBlock listItemBlock, int level) => new OsuMarkdownListItem(listItemBlock, level);
|
||||
|
||||
protected override MarkdownPipeline CreateBuilder()
|
||||
=> new MarkdownPipelineBuilder().UseAutoIdentifiers(AutoIdentifierOptions.GitHub)
|
||||
|
@ -1,6 +1,7 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using Markdig.Syntax;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
@ -23,11 +24,11 @@ namespace osu.Game.Graphics.Containers.Markdown
|
||||
|
||||
public FillFlowContainer Content { get; }
|
||||
|
||||
public OsuMarkdownListItem(int level, int order)
|
||||
public OsuMarkdownListItem(ListItemBlock listItemBlock, int level)
|
||||
{
|
||||
this.level = level;
|
||||
this.order = order;
|
||||
isOrdered = order != 0;
|
||||
this.order = listItemBlock.Order;
|
||||
isOrdered = ((ListBlock)listItemBlock.Parent).IsOrdered;
|
||||
|
||||
AutoSizeAxes = Axes.Y;
|
||||
RelativeSizeAxes = Axes.X;
|
||||
|
Loading…
Reference in New Issue
Block a user