More conf docs

This commit is contained in:
Kovid Goyal
2018-06-04 22:17:52 +05:30
parent db32079bd8
commit 1168687923
3 changed files with 151 additions and 67 deletions

View File

@@ -381,11 +381,15 @@ def render_conf(conf_name, all_options):
a(group.start_text)
a('')
def handle_group_end(group):
if group.end_text:
a(''), a(current_group.end_text)
def handle_group(new_group, new_group_is_shortcut=False):
nonlocal current_group
if new_group is not current_group:
if current_group and current_group.end_text:
a(''), a(current_group.end_text)
if current_group:
handle_group_end(current_group)
current_group = new_group
render_group(current_group)
@@ -429,6 +433,8 @@ def render_conf(conf_name, all_options):
else:
handle_shortcuts(opt)
if current_group:
handle_group_end(current_group)
return '\n'.join(ans)