@@ -139,8 +139,9 @@ LogGroup 'Files analyzed' {
139139# Transform the Command property with markdown code fences before building the table
140140# --------------------------------------------------------------------------------
141141$missedForDisplay = $codeCoverage.CommandsMissed | Sort-Object - Property File, Line | ForEach-Object {
142- $command = ' <pre><code class='' language-pwsh'' style="white-space: pre;">{0}</pre></code>' -f (Normalize- IndentationExceptFirst - Code $_.Command )
143- $command = $command.Replace ([Environment ]::NewLine, ' <br>' ).Replace(' ' , ' ' )
142+ $command = (Normalize- IndentationExceptFirst - Code $_.Command )
143+ $command = $command.Replace ([Environment ]::NewLine, ' <br>' ).Replace(' ' , ' ' ).Replace(' {' , ' \{' ).Replace(' }' , ' \}' )
144+ $command = ' <pre><code class='' language-pwsh'' >{0}</pre></code>' -f $command
144145 [PSCustomObject ]@ {
145146 File = $_.File
146147 Line = $_.Line
@@ -154,8 +155,9 @@ $missedForDisplay = $codeCoverage.CommandsMissed | Sort-Object -Property File, L
154155}
155156
156157$executedForDisplay = $codeCoverage.CommandsExecuted | Sort-Object - Property File, Line | ForEach-Object {
157- $command = ' <pre><code class='' language-pwsh'' style="white-space: pre;">{0}</pre></code>' -f (Normalize- IndentationExceptFirst - Code $_.Command )
158- $command = $command.Replace ([Environment ]::NewLine, ' <br>' ).Replace(' ' , ' ' )
158+ $command = (Normalize- IndentationExceptFirst - Code $_.Command )
159+ $command = $command.Replace ([Environment ]::NewLine, ' <br>' ).Replace(' ' , ' ' ).Replace(' {' , ' \{' ).Replace(' }' , ' \}' )
160+ $command = ' <pre><code class='' language-pwsh'' >{0}</pre></code>' -f $command
159161 [PSCustomObject ]@ {
160162 File = $_.File
161163 Line = $_.Line
0 commit comments