chiark / gitweb /
m.dox: the <file> doesn't need to have <path>.
authorVladimír Vondruš <mosra@centrum.cz>
Fri, 22 Feb 2019 17:48:19 +0000 (18:48 +0100)
committerVladimír Vondruš <mosra@centrum.cz>
Fri, 22 Feb 2019 17:48:38 +0000 (18:48 +0100)
Happens with the updated STL tag files from cppreference.com.

pelican-plugins/m/dox.py

index fb2de77ca6d0d191c8081ab9e577023f666ab98d..28dbf8669ca1ddaf203a2d0a6930516e6d80000e 100644 (file)
@@ -80,8 +80,9 @@ def init(pelicanobj):
 
                 # Linking to files
                 if child.attrib['kind'] == 'file':
+                    file_path = child.find('path')
                     link = path + child.find('filename').text + ".html"
-                    symbol_mapping[child.find('path').text + child.find('name').text] = (None, link, css_classes)
+                    symbol_mapping[(file_path.text if file_path is not None else '') + child.find('name').text] = (None, link, css_classes)
 
                     for member in child.findall('member'):
                         if not 'kind' in member.attrib: continue