From c8cf1537bfa0cee131d7750795484e2572b5674c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 4 Oct 2022 12:13:06 +0200 Subject: [PATCH] m.dox: allow linking to variables as well. I have *many* tags now, and need to be able to refer to them. --- doc/documentation/corrade.tag | 7 +++++++ plugins/m/dox.py | 4 ++-- plugins/m/test/dox/page.html | 1 + plugins/m/test/dox/page.rst | 1 + plugins/m/test/dox/page_css_classes.html | 1 + 5 files changed, 12 insertions(+), 2 deletions(-) diff --git a/doc/documentation/corrade.tag b/doc/documentation/corrade.tag index 0c3f9a5a..16a5d59c 100644 --- a/doc/documentation/corrade.tag +++ b/doc/documentation/corrade.tag @@ -34,6 +34,13 @@ a5ac77ad25e27290ff059450af138fbed + + constexpr AllocatedInitT + AllocatedInit + namespaceCorrade_1_1Containers.html + a1f81c0df1f144ff03f4f02f6721f615b + + Corrade::Containers::String diff --git a/plugins/m/dox.py b/plugins/m/dox.py index fdb00be2..3c9b1346 100644 --- a/plugins/m/dox.py +++ b/plugins/m/dox.py @@ -97,8 +97,8 @@ def init(tagfiles, input): for member in child.findall('member'): if not 'kind' in member.attrib: continue - # Typedefs, constants - if member.attrib['kind'] == 'typedef' or member.attrib['kind'] == 'enumvalue': + # Typedefs, constants, variables + if member.attrib['kind'] in ['typedef', 'enumvalue', 'variable']: symbol_mapping[name + '::' + member.find('name').text] = (None, link + '#' + member.find('anchor').text, css_classes) # Functions diff --git a/plugins/m/test/dox/page.html b/plugins/m/test/dox/page.html index 2cab3949..dad719af 100644 --- a/plugins/m/test/dox/page.html +++ b/plugins/m/test/dox/page.html @@ -30,6 +30,7 @@
  • Typedef link: Containers::StringView
  • Enum link: Utility::Path::ListFlag
  • Enum value link: Utility::Path::ListFlag::SkipDirectories
  • +
  • Variable link: Containers::AllocatedInit
  • Custom link title
  • Page link with custom title
  • Link to index page
  • diff --git a/plugins/m/test/dox/page.rst b/plugins/m/test/dox/page.rst index 62b8728b..d467e1ce 100644 --- a/plugins/m/test/dox/page.rst +++ b/plugins/m/test/dox/page.rst @@ -10,6 +10,7 @@ m.dox - Typedef link: :dox:`Containers::StringView` - Enum link: :dox:`Utility::Path::ListFlag` - Enum value link: :dox:`Utility::Path::ListFlag::SkipDirectories` +- Variable link: :dox:`Containers::AllocatedInit` - :dox:`Custom link title ` - :dox:`Page link with custom title ` - :dox:`Link to index page ` diff --git a/plugins/m/test/dox/page_css_classes.html b/plugins/m/test/dox/page_css_classes.html index 0d764751..682eef13 100644 --- a/plugins/m/test/dox/page_css_classes.html +++ b/plugins/m/test/dox/page_css_classes.html @@ -30,6 +30,7 @@
  • Typedef link: Containers::StringView
  • Enum link: Utility::Path::ListFlag
  • Enum value link: Utility::Path::ListFlag::SkipDirectories
  • +
  • Variable link: Containers::AllocatedInit
  • Custom link title
  • Page link with custom title
  • Link to index page
  • -- 2.30.2