Add a tertiary header parser to the guidebook document parser (#35315)
This commit is contained in:
committed by
GitHub
parent
cbecc4cc4b
commit
fdf19c6a90
@@ -109,7 +109,17 @@ public sealed partial class DocumentParsingManager
|
|||||||
.Cast<Control>()))
|
.Cast<Control>()))
|
||||||
.Labelled("subheader");
|
.Labelled("subheader");
|
||||||
|
|
||||||
private static readonly Parser<char, Control> TryHeaderControl = OneOf(SubHeaderControlParser, HeaderControlParser);
|
private static readonly Parser<char, Control> TertiaryHeaderControlParser = Try(String("###"))
|
||||||
|
.Then(SkipWhitespaces.Then(Map(text => new Label
|
||||||
|
{
|
||||||
|
Text = text,
|
||||||
|
StyleClasses = { "LabelKeyText" }
|
||||||
|
},
|
||||||
|
AnyCharExcept('\n').AtLeastOnceString())
|
||||||
|
.Cast<Control>()))
|
||||||
|
.Labelled("tertiaryheader");
|
||||||
|
|
||||||
|
private static readonly Parser<char, Control> TryHeaderControl = OneOf(TertiaryHeaderControlParser, SubHeaderControlParser, HeaderControlParser);
|
||||||
|
|
||||||
private static readonly Parser<char, Control> ListControlParser = Try(Char('-'))
|
private static readonly Parser<char, Control> ListControlParser = Try(Char('-'))
|
||||||
.Then(SkipWhitespaces)
|
.Then(SkipWhitespaces)
|
||||||
|
|||||||
Reference in New Issue
Block a user