From: Vladimír Vondruš Date: Tue, 16 Jan 2018 12:54:29 +0000 (+0100) Subject: m.dox: some patches to make this work with the cppreference tag file. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=a5c8ef9f1a55cf22fbe5637ca8b17e409f7ccc83;p=blog.git m.dox: some patches to make this work with the cppreference tag file. --- diff --git a/pelican-plugins/m/dox.py b/pelican-plugins/m/dox.py index c23b1cc2..a5b6f4e2 100644 --- a/pelican-plugins/m/dox.py +++ b/pelican-plugins/m/dox.py @@ -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') # 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) + # 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':