diff --git a/support/python/mkdocstrings_handlers/cxx/__init__.py b/support/python/mkdocstrings_handlers/cxx/__init__.py index d0432100..1aac39ec 100644 --- a/support/python/mkdocstrings_handlers/cxx/__init__.py +++ b/support/python/mkdocstrings_handlers/cxx/__init__.py @@ -3,10 +3,11 @@ import os from pathlib import Path -import xml.etree.ElementTree as et -from mkdocstrings.handlers.base import BaseHandler from typing import Any, List, Mapping, Optional from subprocess import CalledProcessError, PIPE, Popen, STDOUT +import xml.etree.ElementTree as et + +from mkdocstrings.handlers.base import BaseHandler class Definition: '''A definition extracted by Doxygen.''' @@ -288,6 +289,8 @@ class CxxHandler(BaseHandler): return self.collect_compound(identifier, cls) def render(self, d: Definition, config: dict) -> str: + if d.id is not None: + self.do_heading('', 0, id=d.id) text = '
\n' text += render_decl(d) text += '
\n'