< Back

ConvertFrom-GitHubMarkdown

Sat Jan 18, 2020 9:34 pm

NAME ConvertFrom-GitHubMarkdown



SYNOPSIS

Converts arbitrary Markdown into HTML.





SYNTAX

ConvertFrom-GitHubMarkdown [-Content] <String> [[-Mode] <String>] [[-Context] <String>] [[-AccessToken] <String>]

[-NoStatus] [-WhatIf] [-Confirm] [<CommonParameters>]





DESCRIPTION

Converts arbitrary Markdown into HTML.



The Git repo for this module can be found here: http://aka.ms/PowerShellForGitHub





PARAMETERS

-Content <String>

The Markdown text to render to HTML. Content must be 400 KB or less.



Required? true

Position? 1

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Mode <String>

The rendering mode for the Markdown content.



Markdown - Renders Content in plain Markdown, just like README.md files are rendered



GitHubFlavoredMarkdown - Creates links for user mentions as well as references to

SHA-1 hashes, issues, and pull requests.



Required? false

Position? 2

Default value markdown

Accept pipeline input? false

Accept wildcard characters? false



-Context <String>

The repository to use when creating references in 'githubFlavoredMarkdown' mode.

Specify as [ownerName]/[repositoryName].



Required? false

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-AccessToken <String>

If provided, this will be used as the AccessToken for authentication with the

REST Api. Otherwise, will attempt to use the configured value or will run unauthenticated.



Required? false

Position? 4

Default value

Accept pipeline input? false

Accept wildcard characters? false



-NoStatus [<SwitchParameter>]

If this switch is specified, long-running commands will run on the main thread

with no commandline status update. When not specified, those commands run in

the background, enabling the command prompt to provide status information.

If not supplied here, the DefaultNoStatus configuration property value will be used.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Confirm [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

[String] The HTML version of the Markdown content.





-------------------------- EXAMPLE 1 --------------------------



PS C:\\>ConvertFrom-GitHubMarkdown -Content '**Bolded Text**' -Mode Markdown



Returns back '<p><strong>Bolded Text</strong></p>'











RELATED LINKS