diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2015-10-18 12:18:35 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2015-10-18 12:18:35 +0200 |
commit | f7fe751bec2ef23f0b29c4b5406dc48f6073fccc (patch) | |
tree | 749b8f4be06cb98891507d46b58c04e8a69b1a35 | |
parent | 80293c2447610a54ca99026d7d6a9ede15fe0d0d (diff) | |
parent | 0fc6a708ef1e9203cc615da45a908bffb550ec59 (diff) | |
download | weechat-f7fe751bec2ef23f0b29c4b5406dc48f6073fccc.zip |
Merge pull request #553 from sim642/issue-532
doc: add clickable anchors to hdata listing in plugin API reference
-rw-r--r-- | doc/docgen.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/docgen.py b/doc/docgen.py index 629f2d339..e9f31eee8 100644 --- a/doc/docgen.py +++ b/doc/docgen.py @@ -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'), |