Skip to content

Commit

Permalink
Fix --numbered with --no-toc (Issue #405)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelrsweet committed Dec 24, 2020
1 parent 7c9e86f commit c3e825b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
(Issue #396)
- Fixed a regression in the handling of character entities for UTF-8 input
(Issue #401)
- The `--numbered` option did not work when the table-of-contents was disabled
(Issue #405)


# Changes in HTMLDOC v1.9.10
Expand Down
7 changes: 7 additions & 0 deletions htmldoc/htmldoc.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1271,9 +1271,16 @@ main(int argc, /* I - Number of command-line arguments */
*/

if (OutputType == OUTPUT_BOOK && TocLevels > 0)
{
toc = toc_build(document);
}
else
{
if (TocNumbers)
htmlDeleteTree(toc_build(document));

toc = NULL;
}

htmlDebugStats("Table of Contents Tree", toc);

Expand Down

0 comments on commit c3e825b

Please sign in to comment.