Mercurial > public > mercurial-scm > hg
diff doc/gendoc.py @ 51840:76387080f238
help: add :config-doc:`section.key` shorthand to insert documentation
The config items defined in the configitems.toml file can already hold their
documentation. Having some way to automatically insert it was a long standing
low hanging fruit. So I did a first implementation on that. It fairly simple,
but it open the door to more.
It will be used in the next changeset.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 05 Sep 2024 12:28:12 +0200 |
parents | a932cad26d37 |
children | 1f5974f8f730 |
line wrap: on
line diff
--- a/doc/gendoc.py Wed Sep 11 20:52:51 2024 +0200 +++ b/doc/gendoc.py Thu Sep 05 12:28:12 2024 +0200 @@ -156,7 +156,8 @@ for extensionname in sorted(allextensionnames()): mod = extensions.load(ui, extensionname, None) ui.write(minirst.subsection(extensionname)) - ui.write(b"%s\n\n" % gettext(pycompat.getdoc(mod))) + ext_doc = help.ext_help(ui, mod) + ui.write(b"%s\n\n" % ext_doc) cmdtable = getattr(mod, 'cmdtable', None) if cmdtable: ui.write(minirst.subsubsection(_(b'Commands')))