mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:17:23 +08:00
Add missing null handling for never Markdig
version
This commit is contained in:
parent
aa700702fe
commit
e8d4147773
@ -30,9 +30,12 @@ namespace osu.Game.Graphics.Containers.Markdown
|
||||
break;
|
||||
|
||||
case ListItemBlock listItemBlock:
|
||||
var isOrdered = ((ListBlock)listItemBlock.Parent).IsOrdered;
|
||||
var childContainer = CreateListItem(listItemBlock, level, isOrdered);
|
||||
bool isOrdered = ((ListBlock)listItemBlock.Parent)?.IsOrdered == true;
|
||||
|
||||
OsuMarkdownListItem childContainer = CreateListItem(listItemBlock, level, isOrdered);
|
||||
|
||||
container.Add(childContainer);
|
||||
|
||||
foreach (var single in listItemBlock)
|
||||
base.AddMarkdownComponent(single, childContainer.Content, level);
|
||||
break;
|
||||
|
@ -33,7 +33,7 @@ namespace osu.Game.Overlays.Wiki.Markdown
|
||||
|
||||
case ParagraphBlock paragraphBlock:
|
||||
// Check if paragraph only contains an image
|
||||
if (paragraphBlock.Inline.Count() == 1 && paragraphBlock.Inline.FirstChild is LinkInline { IsImage: true } linkInline)
|
||||
if (paragraphBlock.Inline?.Count() == 1 && paragraphBlock.Inline.FirstChild is LinkInline { IsImage: true } linkInline)
|
||||
{
|
||||
container.Add(new WikiMarkdownImageBlock(linkInline));
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user