diff --git a/scripts/public/Test-NewIssue.ps1 b/scripts/public/Test-NewIssue.ps1 index a4544a5..ce2b6b0 100644 --- a/scripts/public/Test-NewIssue.ps1 +++ b/scripts/public/Test-NewIssue.ps1 @@ -133,18 +133,35 @@ function Test-NewIssue { $warnings = $validationData.messages | Where-Object type -EQ ([MessageType]::Warning) if ($warnings) { $commentBody += "`n`n" + [ValidationMessages]::noticesHeader + $detailsComment = "" $warnings | ForEach-Object { - $commentBody += "`n- $($_.message)" + # When using the
section, special handling is needed + if ($_.message -match "\") { + $detailsComment = $_.message + } + else { + $commentBody += "`n- $($_.message)" + } } + $commentBody += "`n`n$detailsComment" } } $infos = $validationData.messages | Where-Object type -EQ ([MessageType]::Info) if ($infos) { $commentBody += "`n`n" + [ValidationMessages]::maintainersHeader + $detailsComment = "" $infos | ForEach-Object { - $commentBody += "`n- $($_.message)" + # When using the
section, special handling is needed + if ($_.message -match "\") { + $detailsComment = $_.message + } + else { + $commentBody += "`n- $($_.message)" + } } + + $commentBody += "`n`n$detailsComment" } $commentBody += [ValidationMessages]::commentBodyFooter