mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 19:22:54 +08:00
use linq to find first literal inline
This commit is contained in:
parent
6c1fede18e
commit
6d6c03eafe
@ -2,6 +2,7 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Linq;
|
||||||
using Markdig.Syntax;
|
using Markdig.Syntax;
|
||||||
using Markdig.Syntax.Inlines;
|
using Markdig.Syntax.Inlines;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
@ -66,7 +67,7 @@ namespace osu.Game.Overlays.Wiki
|
|||||||
protected override MarkdownHeading CreateHeading(HeadingBlock headingBlock)
|
protected override MarkdownHeading CreateHeading(HeadingBlock headingBlock)
|
||||||
{
|
{
|
||||||
var heading = base.CreateHeading(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);
|
OnAddHeading(title, heading, headingBlock.Level);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user