Skip to content

Commit

Permalink
Rearranged begin-process block code
Browse files Browse the repository at this point in the history
Fixed typo in example demo.ps1 and corresponding README entry
  • Loading branch information
belibug committed Jun 6, 2024
1 parent 231ae88 commit b2f003a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Demo/Demo.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ $markdown+=New-MDAlert -Lines $lines -Style Important

$markdown+=New-MDParagraph -Lines "Multi line Alert with 'Tip' Style"
$lines=@(
"Git is "
"Line 1"
"Line 2"
)
$markdown+=New-MDAlert -Lines $lines -Style Tip
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ $markdown+=New-MDAlert -Lines $lines -Style Important
$markdown+=New-MDParagraph -Lines "Multi line Alert with 'Tip' Style"
$lines=@(
"Git is "
"Line 1"
"Line 2"
)
$markdown+=New-MDAlert -Lines $lines -Style Tip
Expand Down Expand Up @@ -261,7 +261,7 @@ $markdown
> Multi line Alert with 'Tip' Style
>
> > [!TIP]
> > Git is
> > Line 1
> > Line 2
>
> # Links
Expand Down
4 changes: 2 additions & 2 deletions Src/Modules/MarkdownPS/Public/New-MDAlert.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@ function New-MDAlert {
Begin {
$output = ''
$newLine = [System.Environment]::NewLine
$admonition = '> [!{0}]' -f $Style.ToUpper()
$output += $admonition + $newLine
}

Process {
$output += New-MDQuote -Lines $Lines -Level 1 -NoNewLine
}

End {
$admonition = '> [!{0}]' -f $Style.ToUpper()
$output = $admonition + $newLine +$output
if (-not $NoNewLine) {
$output += $newLine
}
Expand Down

0 comments on commit b2f003a

Please sign in to comment.