1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-01 15:26:37 +02:00

doc: add clickable anchors to hdata listing in plugin API reference

This commit is contained in:
Simmo Saan
2015-10-18 12:16:48 +03:00
parent 80293c2447
commit 0fc6a708ef
+4 -2
View File
@@ -630,13 +630,15 @@ def docgen_cmd_cb(data, buf, args):
doc = AutogenDoc(directory, 'plugin_api', 'hdata')
for plugin in sorted(hdata):
for hdata_name in sorted(hdata[plugin]):
anchor = 'hdata_{0}'.format(hdata_name)
_hda = hdata[plugin][hdata_name]
desc = translate(_hda['description'])
variables = _hda['vars']
variables_update = _hda['vars_update']
lists = _hda['lists']
doc.write('* \'{0}\': {1}\n'.format(escape(hdata_name),
escape(desc)))
doc.write('* [[{0}]]<<{0},\'{1}\'>>: {2}\n'
''.format(escape(anchor), escape(hdata_name),
escape(desc)))
doc.write('** {0}: {1}\n'.format(_('plugin'),
escape(plugin)))
doc.write('** {0}:\n{1}'.format(_('variables'),