From: Vladimír Vondruš Date: Mon, 29 Jan 2018 22:47:32 +0000 (+0100) Subject: doxygen: render Reference in TOC only if there is some reference. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=10d62f3e19eeea7a7a99d4e5cd756e0aadd33233;p=blog.git doxygen: render Reference in TOC only if there is some reference. --- diff --git a/doxygen/templates/base-reference.html b/doxygen/templates/base-reference.html index 811fe571..51a87e05 100644 --- a/doxygen/templates/base-reference.html +++ b/doxygen/templates/base-reference.html @@ -41,6 +41,7 @@
  • {{ name }}
  • {% endif %} {% endfor %} + {% if compound.modules or compound.dirs or compound.files or compound.namespaces or compound.classes or compound.typedefs or compound.funcs or compound.vars or compound.defines or compound.groups %}
  • Reference
  • + {% endif %} {% endif %} diff --git a/doxygen/test/compound_modules/group__subgroup.html b/doxygen/test/compound_modules/group__subgroup.html index 73269df6..0033b88c 100644 --- a/doxygen/test/compound_modules/group__subgroup.html +++ b/doxygen/test/compound_modules/group__subgroup.html @@ -35,33 +35,10 @@

    Contents

    -
    -

    Functions

    -
    -
    - auto fizzbuzz() -> int -
    -
    Returns 5 every 5 runs or something.
    -
    -
    -
    -

    Function documentation

    -
    -

    - int fizzbuzz() -

    -

    Returns 5 every 5 runs or something.

    -

    Did I pass the interview now?

    -
    -
    +

    Description

    Subgroup description. There are no members, so there should be also no Reference section in the TOC.

    diff --git a/doxygen/test/compound_modules/input.h b/doxygen/test/compound_modules/input.h index 753fe3a0..c795f7f8 100644 --- a/doxygen/test/compound_modules/input.h +++ b/doxygen/test/compound_modules/input.h @@ -21,13 +21,9 @@ void bar(); @defgroup subgroup A subgroup @brief Subgroup brief description @ingroup group -@{ */ -/** -@brief Returns 5 every 5 runs or something +@section subgroup-description Description -Did I pass the interview now? +Subgroup description. There are **no members**, so there should be also no +Reference section in the TOC. */ -int fizzbuzz(); - -/*@}*/