Set-MarkdownDetails¶
SYNOPSIS¶
Generates a collapsible Markdown details block.
SYNTAX¶
Set-MarkdownDetails [-Title] <String> [-Content] <ScriptBlock> [-ProgressAction <ActionPreference>]
[<CommonParameters>]
DESCRIPTION¶
This function creates a collapsible Markdown <details>
block with a summary title
and formatted content.
It captures the output of the provided script block and
wraps it in a Markdown details structure.
EXAMPLES¶
EXAMPLE 1¶
Set-MarkdownDetails -Title 'More Information' -Content {
'This is detailed content.'
}
Output:
<details><summary>More Information</summary>
<p>
This is detailed content.
</p>
</details>
Generates a Markdown details block with the title "More Information" and the specified content.
EXAMPLE 2¶
Details 'More Information' {
'This is detailed content.'
}
Output:
<details><summary>More Information</summary>
<p>
This is detailed content.
</p>
</details>
Generates a Markdown details block with the title "More Information" and the specified content.
PARAMETERS¶
-Title¶
The title of the Markdown details block.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Content¶
The content inside the Markdown details block.
Type: ScriptBlock
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ProgressAction¶
{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters¶
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS¶
OUTPUTS¶
string¶
NOTES¶
Returns the formatted Markdown details block as a string.