다음을 통해 공유


Set-MarkdownOption

Sets the colors and styles used for rendering Markdown content in the console.

구문

IndividualSetting (기본값)

Set-MarkdownOption
    [-Header1Color <String>]
    [-Header2Color <String>]
    [-Header3Color <String>]
    [-Header4Color <String>]
    [-Header5Color <String>]
    [-Header6Color <String>]
    [-Code <String>]
    [-ImageAltTextForegroundColor <String>]
    [-LinkForegroundColor <String>]
    [-ItalicsForegroundColor <String>]
    [-BoldForegroundColor <String>]
    [-PassThru]
    [<CommonParameters>]

Theme

Set-MarkdownOption
    -Theme <String>
    [-PassThru]
    [<CommonParameters>]

InputObject

Set-MarkdownOption
    [-InputObject] <PSObject>
    [-PassThru]
    [<CommonParameters>]

Description

Sets the colors and styles used for rendering Markdown content in the console. These styles are defined using ANSI escape codes that change the color and style of the Markdown text being rendered.

For more information about Markdown, see the CommonMark website.

Note

The string values used in the settings are the characters that follow the Escape character ([char]0x1B) for the ANSI escape sequence. Do not include the Escape character in the string. For more information about ANSI escape codes work, see ANSI_escape_code.

예제

Example 1 - Switch to the Light Theme

This example selects the Light theme and displays the new configuration using the PassThru parameter.

Set-MarkdownOption -Theme Light -PassThru
Header1         : [7m
Header2         : [4;33m
Header3         : [4;34m
Header4         : [4;35m
Header5         : [4;36m
Header6         : [4;30m
Code            : [48;2;155;155;155;38;2;30;30;30m
Link            : [4;38;5;117m
Image           : [33m
EmphasisBold    : [1m
EmphasisItalics : [36m

Example 2 - Customize the color and style settings

This example changes the escape code for the Markdown headers. The default configuration for headers renders them as underlined text of various colors. This change removes the underline style.

$mdOptions = Get-MarkdownOption
$mdOptions.Header2 = '[93m'
$mdOptions.Header3 = '[94m'
$mdOptions.Header4 = '[95m'
$mdOptions.Header5 = '[96m'
$mdOptions.Header6 = '[97m'
Set-MarkdownOption -InputObject $mdOptions -PassThru
Header1         : [7m
Header2         : [93m
Header3         : [94m
Header4         : [95m
Header5         : [96m
Header6         : [97m
Code            : [48;2;155;155;155;38;2;30;30;31m
Link            : [4;38;5;117m
Image           : [33m
EmphasisBold    : [1m
EmphasisItalics : [36m

매개 변수

-BoldForegroundColor

Sets the foreground color for rendering bold Markdown text.

매개 변수 속성

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

매개 변수 집합

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

-Code

Sets the color for rendering code blocks and spans in Markdown text.

매개 변수 속성

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

매개 변수 집합

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

-Header1Color

Sets the color for rendering Header1 blocks in Markdown text.

매개 변수 속성

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

매개 변수 집합

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

-Header2Color

Sets the color for rendering Header2 blocks in Markdown text.

매개 변수 속성

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

매개 변수 집합

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

-Header3Color

Sets the color for rendering Header3 blocks in Markdown text.

매개 변수 속성

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

매개 변수 집합

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

-Header4Color

Sets the color for rendering Header4 blocks in Markdown text.

매개 변수 속성

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

매개 변수 집합

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

-Header5Color

Sets the color for rendering Header5 blocks in Markdown text.

매개 변수 속성

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

매개 변수 집합

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

-Header6Color

Sets the color for rendering Header6 blocks in Markdown text.

매개 변수 속성

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

매개 변수 집합

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

-ImageAltTextForegroundColor

Sets the foreground color for rendering the alternate text of an image element in Markdown text.

매개 변수 속성

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

매개 변수 집합

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

-InputObject

A PSMarkdownOptionInfo object containing the configuration to be set.

매개 변수 속성

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

매개 변수 집합

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

-ItalicsForegroundColor

Sets the foreground color for rendering the italics in Markdown text.

매개 변수 속성

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

매개 변수 집합

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

-LinkForegroundColor

Sets the foreground color for rendering hyperlinks in Markdown text.

매개 변수 속성

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

매개 변수 집합

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

-PassThru

Causes the cmdlet to output a PSMarkdownOptionInfo object containing the new configuration.

매개 변수 속성

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

매개 변수 집합

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

-Theme

Selects a theme containing predefined color settings. The possible values are Dark and Light.

매개 변수 속성

형식:String
Default value:None
허용되는 값:Dark, Light
와일드카드 지원:False
DontShow:False

매개 변수 집합

Theme
Position:Named
필수:True
파이프라인의 값: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

출력

Microsoft.PowerShell.MarkdownRender.PSMarkdownOptionInfo

참고

The string values used to define the color and style must match the regular expression ^\[*[0-9;]*?m{1}.