Skip to content

Commit

Permalink
No new line for last path
Browse files Browse the repository at this point in the history
  • Loading branch information
valleyofdoom committed Jun 27, 2024
1 parent dff6993 commit 068ff3a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion bin/apply-registry.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,9 @@ function main() {
# start code block
Add-Content -Path $mdfile -Value "``````"

# used to keep track of last path
$keyCount = 0

foreach ($path in $options[$option].Keys) {
# write path
Add-Content -Path $mdfile -Value "[$($path)]"
Expand Down Expand Up @@ -718,7 +721,14 @@ function main() {
Add-Content -Path $mdfile -Value $keyString
}

Add-Content -Path $mdfile -Value ""
$keyCount++

$isLastPath = $keyCount -eq $options[$option].Keys.Count

if (-not $isLastPath) {
Add-Content -Path $mdfile -Value ""
}

}

# end code block
Expand Down

0 comments on commit 068ff3a

Please sign in to comment.