diff --git a/scripts/helpers/Build/Build-PSModuleDocumentation.ps1 b/scripts/helpers/Build/Build-PSModuleDocumentation.ps1 index d511e25..d598834 100644 --- a/scripts/helpers/Build/Build-PSModuleDocumentation.ps1 +++ b/scripts/helpers/Build/Build-PSModuleDocumentation.ps1 @@ -41,19 +41,29 @@ function Build-PSModuleDocumentation { $fixedOpening = $true } elseif ($line -match '^```.+$') { $fixedOpening = $true - } elseif ($line -match '^```$'){ + } elseif ($line -match '^```$') { $fixedOpening = $false } $newContent += $line } $newContent | Set-Content -Path $_.FullName } + Get-ChildItem -Path $DocsOutputFolder -Recurse -Force -Include '*.md' | ForEach-Object { + $content = Get-Content -Path $_.FullName -Raw + $content = $content -replace '\\`', '`' + $content = $content -replace '\\\[', '[' + $content = $content -replace '\\\]', ']' + $content = $content -replace '\\\<', '<' + $content = $content -replace '\\\>', '>' + $content = $content -replace '\\\\', '\' + $content | Set-Content -Path $_.FullName + } Stop-LogGroup Get-ChildItem -Path $DocsOutputFolder -Recurse -Force -Include '*.md' | ForEach-Object { $fileName = $_.Name $hash = (Get-FileHash -Path $_.FullName -Algorithm SHA256).Hash - Start-LogGroup "- File: [$fileName] - [$hash]" + Start-LogGroup " - [$fileName] - [$hash]" Show-FileContent -Path $_ Stop-LogGroup } diff --git a/tests/src/PSModuleTest/public/New-PSModuleTest.ps1 b/tests/src/PSModuleTest/public/New-PSModuleTest.ps1 index 7f26215..d97e8f3 100644 --- a/tests/src/PSModuleTest/public/New-PSModuleTest.ps1 +++ b/tests/src/PSModuleTest/public/New-PSModuleTest.ps1 @@ -9,6 +9,11 @@ function New-PSModuleTest { Test-PSModule -Name 'World' "Hello, World!" + + .NOTES + Testing if a module can have a [Markdown based link](https://example.com). + !"#¤%&/()=?`´^¨*'-_+§½{[]}<>|@£$€¥¢:;.," + \[This is a test\] #> [Diagnostics.CodeAnalysis.SuppressMessageAttribute( 'PSUseShouldProcessForStateChangingFunctions', '', Scope = 'Function',