changeset 46518:85ec89c47a04

gendoc: use an empty comment so aliases are separated from previous elements For commands like `hg bookmarks`, where there's no `[+] marked option can be specified multiple times`, this causes the final option in the option list to not be the parent of the aliases definition. The aliases section is thus marked as a blockquote like on commands that do have text separating the option list and the aliases definition. Differential Revision: https://phab.mercurial-scm.org/D9990
author Kyle Lippincott <spectral@google.com>
date Fri, 12 Feb 2021 13:27:03 -0800
parents eb36f7a71291
children 83ac7c91e172
files doc/gendoc.py
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/doc/gendoc.py	Fri Feb 12 11:06:56 2021 -0800
+++ b/doc/gendoc.py	Fri Feb 12 13:27:03 2021 -0800
@@ -317,7 +317,12 @@
                 ui.write(b"\n")
             # aliases
             if d[b'aliases']:
-                ui.write(_(b"    aliases: %s\n\n") % b" ".join(d[b'aliases']))
+                # Note the empty comment, this is required to separate this
+                # (which should be a blockquote) from any preceding things (such
+                # as a definition list).
+                ui.write(
+                    _(b"..\n\n    aliases: %s\n\n") % b" ".join(d[b'aliases'])
+                )
 
 
 def allextensionnames():