Closed danielparks closed 2 years ago
I realized that it was a lot clearer to pull PuppetStrings::Markdown::TableOfContents
into the general renderer, so I did. I also did some future-rubocop-related clean ups, though it’s still going to take some work to rebase this after #310 lands.
Previously, the “Public X” header would be displayed if there were any private X regardless of whether there were any public X.
For example, having a private function would make both the “Public Functions” and “Private Functions” headers appear, even if there weren’t any public functions.
This changes it so that there are three conditions:
In other words, if there are no private Xs, then it just lists the public once. Otherwise, it splits them up under public/private headers but avoids showing a header if it’s contents will be empty.
This also radically simplifies and removes a bunch of boilerplate code around rendering these sections.