Skip to content

Commit

Permalink
m.dox: some patches to make this work with the cppreference tag file.
Browse files Browse the repository at this point in the history
  • Loading branch information
mosra committed Jan 16, 2018
1 parent 67182dc commit a5c8ef9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pelican-plugins/m/dox.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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':
Expand Down

0 comments on commit a5c8ef9

Please sign in to comment.