From 3ca84df551f38da14fc6d925988b13156567b5ca Mon Sep 17 00:00:00 2001 From: Joachim Meyer Date: Thu, 21 Dec 2017 20:23:21 +0100 Subject: Enums get listed in the docs and enum members now also link to the corresponding enum in the webdocs Fixes #13254 --- doc/tools/makerst.py | 45 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py index cd0108019..492f3b6d5 100644 --- a/doc/tools/makerst.py +++ b/doc/tools/makerst.py @@ -276,6 +276,15 @@ def make_type(t): return ':ref:`' + t + '`' return t +def make_enum(t): + global class_names + p = t.find(".") + if p >= 0: + c = t[0:p] + e = t[p+1:] + if c in class_names: + return ':ref:`' + e + '`' + return t def make_method( f, @@ -470,7 +479,10 @@ def make_rst_class(node): # Leading two spaces necessary to prevent breaking the