chiark / gitweb /
m.dox: some patches to make this work with the cppreference tag file.
authorVladimír Vondruš <mosra@centrum.cz>
Tue, 16 Jan 2018 12:54:29 +0000 (13:54 +0100)
committerVladimír Vondruš <mosra@centrum.cz>
Tue, 16 Jan 2018 21:45:39 +0000 (22:45 +0100)
pelican-plugins/m/dox.py

index c23b1cc214d6233074ce39f77c3ec1e90376b2ac..a5b6f4e2db3b3504bc293c81117d9c351554587c 100644 (file)
@@ -73,7 +73,7 @@ def init(pelicanobj):
                 # Linking to namespaces, structs and classes
                 if child.attrib['kind'] in ['class', 'struct', 'namespace']:
                     name = child.find('name').text
-                    link = path + child.find('filename').text
+                    link = path + child.findtext('filename') # <filename> can be empty (cppreference tag file)
                     symbol_mapping[name] = (None, link)
                     for member in child.findall('member'):
                         if not 'kind' in member.attrib: continue
@@ -84,7 +84,8 @@ def init(pelicanobj):
 
                         # Functions
                         if member.attrib['kind'] == 'function':
-                            symbol_mapping[name + '::' + member.find('name').text + "()"] = (None, link + '#' + member.find('anchor').text)
+                            # <filename> can be empty (cppreference tag file)
+                            symbol_mapping[name + '::' + member.find('name').text + "()"] = (None, link + '#' + member.findtext('anchor'))
 
                         # Enums with values
                         if member.attrib['kind'] == 'enumeration':