Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/Generators/HTML.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,11 @@ protected function printHeader()
*/
protected function printToc()
{
// Only show a TOC when there are two or more docs to display.
if (count($this->docFiles) < 2) {
return;
}

echo ' <h2>Table of Contents</h2>'.PHP_EOL;
echo ' <ul class="toc">'.PHP_EOL;

Expand Down
4 changes: 0 additions & 4 deletions tests/Core/Generators/Expectations/ExpectedOutputOneDoc.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@
</head>
<body>
<h1>GeneratorTest Coding Standards</h1>
<h2>Table of Contents</h2>
<ul class="toc">
<li><a href="#One-Standard-Block,-No-Code">One Standard Block, No Code</a></li>
</ul>
<a name="One-Standard-Block,-No-Code" />
<h2>One Standard Block, No Code</h2>
<p class="text">Documentation contains one standard block and no code comparison.</p>
Expand Down