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

use OsuMarkdownListItem for ListItemBlock

This commit is contained in:
Gagah Pangeran Rosfatiputra 2021-04-30 09:43:21 +07:00
parent 820408757a
commit a24a279404
No known key found for this signature in database
GPG Key ID: 25F6F17FD29031E2

View File

@ -21,6 +21,13 @@ namespace osu.Game.Graphics.Containers.Markdown
// Don't parse YAML Frontmatter
break;
case ListItemBlock listItemBlock:
var childContainer = CreateListItem(listItemBlock);
container.Add(childContainer);
foreach (var single in listItemBlock)
base.AddMarkdownComponent(single, childContainer, level);
break;
default:
base.AddMarkdownComponent(markdownObject, container, level);
break;
@ -37,6 +44,8 @@ namespace osu.Game.Graphics.Containers.Markdown
protected override MarkdownTable CreateTable(Table table) => new OsuMarkdownTable(table);
protected virtual OsuMarkdownListItem CreateListItem(ListItemBlock listItemBlock) => new OsuMarkdownListItem();
protected override MarkdownPipeline CreateBuilder()
=> new MarkdownPipelineBuilder().UseAutoIdentifiers(AutoIdentifierOptions.GitHub)
.UseEmojiAndSmiley()