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
1 changed files with 9 additions and 0 deletions

View File

@ -21,6 +21,13 @@ protected override void AddMarkdownComponent(IMarkdownObject markdownObject, Fil
// 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 @@ protected override void AddMarkdownComponent(IMarkdownObject markdownObject, Fil
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()