다음을 통해 공유


Show-Markdown

Shows a Markdown file or string in the console in a friendly way using VT100 escape sequences or in a browser using HTML.

구문

Path (기본값)

Show-Markdown
    [-Path] <String[]>
    [-UseBrowser]
    [<CommonParameters>]

InputObject

Show-Markdown
    -InputObject <PSObject>
    [-UseBrowser]
    [<CommonParameters>]

LiteralPath

Show-Markdown
    -LiteralPath <String[]>
    [-UseBrowser]
    [<CommonParameters>]

Description

The Show-Markdown cmdlet is used to render Markdown in a human readable format either in a terminal or in a browser.

Show-Markdown can return a string that includes the VT100 escape sequences which the terminal renders (if it supports VT100 escape sequences). This is primarily used for viewing Markdown files in a terminal. You can also get this string via the ConvertFrom-Markdown by specifying the AsVT100EncodedString parameter.

Show-Markdown also has the ability to open a browser and show you a rendered version of the Markdown. It renders the Markdown by turning it into HTML and opening the HTML file in your default browser.

You can change how Show-Markdown renders Markdown in a terminal by using Set-MarkdownOption.

This cmdlet was introduced in PowerShell 6.1.

예제

Example 1: Simple example specifying a path

Show-Markdown -Path ./README.md

Example 2: Simple example specifying a string

@"
# Show-Markdown

## Markdown

You can now interact with Markdown via PowerShell!

*stars*
__underlines__
"@ | Show-Markdown

Example 2: Opening Markdown in a browser

Show-Markdown -Path ./README.md -UseBrowser

매개 변수

-InputObject

A Markdown string that will be shown in the terminal. If you do not pass in a supported format, Show-Markdown will emit an error.

매개 변수 속성

형식:PSObject
Default value:None
와일드카드 지원:False
DontShow:False

매개 변수 집합

InputObject
Position:Named
필수:True
파이프라인의 값:True
속성 이름별 파이프라인의 값:False
나머지 인수의 값:False

-LiteralPath

Specifies the path to a Markdown file. Unlike the Path parameter, the value of LiteralPath is used exactly as it is typed. No characters are interpreted as wildcards. If the path includes escape characters, enclose it in single quotation marks. Single quotation marks tell PowerShell not to interpret any characters as escape sequences.

매개 변수 속성

형식:

String[]

Default value:None
와일드카드 지원:False
DontShow:False
별칭:PSPath, LP

매개 변수 집합

LiteralPath
Position:Named
필수:True
파이프라인의 값:False
속성 이름별 파이프라인의 값:True
나머지 인수의 값:False

-Path

Specifies the path to a Markdown file to be rendered.

매개 변수 속성

형식:

String[]

Default value:None
와일드카드 지원:True
DontShow:False

매개 변수 집합

Path
Position:0
필수:True
파이프라인의 값:False
속성 이름별 파이프라인의 값:True
나머지 인수의 값:False

-UseBrowser

Compiles the Markdown input as HTML and opens it in your default browser.

매개 변수 속성

형식:SwitchParameter
Default value:False
와일드카드 지원:False
DontShow:False

매개 변수 집합

(All)
Position:Named
필수:False
파이프라인의 값:False
속성 이름별 파이프라인의 값:False
나머지 인수의 값:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

입력

PSObject

String

출력

String