Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Get-OfficeMarkdownHeading

Module
PSWriteOffice
Inputs
OfficeIMO.Markdown.MarkdownDocument System.String
Outputs
OfficeIMO.Markdown.MarkdownDocument+HeadingInfo

Gets heading metadata from a Markdown document.

Syntax

Get-OfficeMarkdownHeading
[-Anchor <String>]
[-CaseSensitive]
[-Document <MarkdownDocument>]
[-HeadingText <String>]
[-MaxLevel <Int32>]
[-MinLevel <Int32>]
[<CommonParameters>]
#
Parameter set: Document
Get-OfficeMarkdownHeading
[-Anchor <String>]
[-CaseSensitive]
[-HeadingText <String>]
[-MaxLevel <Int32>]
[-MinLevel <Int32>]
[-Options <Object[]>]
[-Path] <String>
[<CommonParameters>]
#
Parameter set: Path
Get-OfficeMarkdownHeading
[-Anchor <String>]
[-CaseSensitive]
[-HeadingText <String>]
-LiteralPath <String>
[-MaxLevel <Int32>]
[-MinLevel <Int32>]
[-Options <Object[]>]
[<CommonParameters>]
#
Parameter set: LiteralPath
Get-OfficeMarkdownHeading
[-Anchor <String>]
[-CaseSensitive]
[-HeadingText <String>]
[-MaxLevel <Int32>]
[-MinLevel <Int32>]
[-Options <Object[]>]
-Text <String>
[<CommonParameters>]
#
Parameter set: Text

Description

Returns heading level, text, resolved anchor, and the backing heading block.

Examples

Read headings from Markdown text.

Get-OfficeMarkdownHeading -Text "# Title`n`n## Details"

Parses Markdown text and returns the document headings.

Inspect a parsed Markdown document.

Open-OfficeMarkdown -Path .\README.md | Get-OfficeMarkdownHeading -MinLevel 2

Returns headings from an existing Markdown document object.

Parameters

-Anchor String optional
Optional wildcard pattern matched against resolved heading anchors.
-CaseSensitive SwitchParameter optional
Use case-sensitive matching for text and anchor filters.
-Document MarkdownDocument optionalpipeline: True (ByValue)sets: Document
Caller-owned document; omission uses the enclosing Markdown document.
-HeadingText String optional
Optional wildcard pattern matched against heading text.
-MaxLevel Int32 optional
Maximum heading level to return.
-MinLevel Int32 optional
Minimum heading level to return.
-Options Object[] optionalsets: Path, LiteralPath, Text
Native reader options and optional native-property hashtable overrides.
-Path String requiredposition: 0pipeline: True (ByValue)sets: Path
Input file with FileSystem wildcard expansion.
-LiteralPath String requiredpipeline: True (ByPropertyName)aliases: FullName, PSPathsets: LiteralPath
Literal input file, including a FileInfo pipeline.
-Text String requiredsets: Text
Markdown source text.

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.