Skip to content

Commit 00aecf2

Browse files
JehoschuaJehoschua
authored andcommitted
Small Enhancement: Function Write-Description:
$Description can now contain Newlines / multiple Lines, they are properly indented.
1 parent 6e61ffe commit 00aecf2

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

plaster/ModuleBuild/scaffold/modulename.build.template

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
[switch]$Force
1010
)
1111

12-
# Basic indented descriptive build output.
1312
Function Write-Description {
14-
param (
13+
# Basic indented descriptive build output. $Description can contain Newlines.
14+
Param (
1515
[string]$color = 'White',
1616
[string]$Description = '',
1717
[int]$Level = 0,
@@ -22,11 +22,12 @@ Function Write-Description {
2222
)
2323

2424
$thisindent = (' ' * $indent) * $level
25-
if ($accent) {
25+
If ($accent) {
2626
$accentleft = $AccentL
2727
$accentright = $AccentR
2828
}
29-
Write-Build $color "$accentleft$thisindent$Description$accentright"
29+
30+
$Description -split '\r\n|\n' | ForEach-Object { Write-Build $color "$accentleft$thisindent$($_)$accentright" }
3031
}
3132

3233
if (Test-Path $BuildFile) {

0 commit comments

Comments
 (0)