1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-23 21:00:27 +08:00

use linq to find first literal inline

This commit is contained in:
Gagah Pangeran Rosfatiputra
2021-06-04 14:45:06 +07:00
Unverified
parent 6c1fede18e
commit 6d6c03eafe
+2 -1
View File
@@ -2,6 +2,7 @@
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Linq;
using Markdig.Syntax;
using Markdig.Syntax.Inlines;
using osu.Framework.Graphics;
@@ -66,7 +67,7 @@ namespace osu.Game.Overlays.Wiki
protected override MarkdownHeading CreateHeading(HeadingBlock headingBlock)
{
var heading = base.CreateHeading(headingBlock);
var title = ((LiteralInline)headingBlock.Inline.FirstChild).Content.ToString();
var title = ((LiteralInline)headingBlock.Inline.First(i => i is LiteralInline)).Content.ToString();
OnAddHeading(title, heading, headingBlock.Level);