INNER CODE UNIT · Python
page_link
introlab/rtabmap · doxygen/generate_parameters_page.py:200
def page_link(param):
"""A link to the parameter's own row on this page."""
return '@ref %s "%s"' % (param.anchor, param.key)
def resolve_description(param, by_accessor):
"""Render the description, resolving uFormat() placeholders to key links."""
text = param.description.strip()
if text.startswith('uFormat('):
args = split_args(text[len('uFormat('):text.rindex(')')])
text = unescape(args[0])
for arg in args[1:]:
match = re.search(r'\bk([A-Za-z0-9]+)\(\)', arg)
replacement = arg.strip()
if match:
other = by_accessor.get('k' + match.group(1))
replacement = page_link(other) if other else match.group(1)
if '"%s"' in text: