Skip to content

Commit

Permalink
Update generate_docs.ps1
Browse files Browse the repository at this point in the history
- added has example column to TOC
  • Loading branch information
tcartwright authored Sep 20, 2021
1 parent fc869a4 commit dff43f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/generate_docs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,11 @@ function New-TableOfContents {
[void]$StringBuilder.AppendLine("## $($category.Name)$spaces")
[void]$StringBuilder.AppendLine("$spaces")

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

Expand Down

0 comments on commit dff43f8

Please sign in to comment.