Skip to content

Commit dff43f8

Browse files
authored
Update generate_docs.ps1
- added has example column to TOC
1 parent fc869a4 commit dff43f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/generate_docs.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,11 @@ function New-TableOfContents {
197197
[void]$StringBuilder.AppendLine("## $($category.Name)$spaces")
198198
[void]$StringBuilder.AppendLine("$spaces")
199199

200-
[void]$StringBuilder.AppendLine("| Rule Id | Friendly Name | Ignorable | Description |")
200+
[void]$StringBuilder.AppendLine("| Rule Id | Friendly Name | Ignorable | Description | Example? |")
201201
[void]$StringBuilder.AppendLine("|----|----|----|----|")
202202
foreach ($rule in ($category.Group | Sort-Object -Property RuleId )) {
203203
$ruleId = "[$($Rule.RuleId)]($($category.Name)/$($Rule.RuleId).md)"
204-
[void]$StringBuilder.AppendLine("| $ruleId | $($Rule.FriendlyName -replace "\|", "|") | $($Rule.IsIgnorable) | $($Rule.Description -replace "\|", "|") |")
204+
[void]$StringBuilder.AppendLine("| $ruleId | $($Rule.FriendlyName -replace "\|", "|") | $($Rule.IsIgnorable) | $($Rule.Description -replace "\|", "|") | $(if ([string]::IsNullOrWhiteSpace($Rule.Example)) { "-" } else { "Yes" }) |")
205205
}
206206
}
207207

0 commit comments

Comments
 (0)