|
|
|
@ -55,6 +55,7 @@ def render_dfhack_keybind(command) -> List[nodes.paragraph]:
|
|
|
|
|
return out
|
|
|
|
|
for keycmd, key, ctx in _KEYBINDS[command]:
|
|
|
|
|
n = nodes.paragraph()
|
|
|
|
|
# TODO: use inline instead of strong when rendering to text
|
|
|
|
|
n += nodes.strong('Keybinding:', 'Keybinding:')
|
|
|
|
|
n += nodes.inline(' ', ' ')
|
|
|
|
|
for k in key:
|
|
|
|
@ -97,6 +98,7 @@ class DFHackToolDirectiveBase(sphinx.directives.ObjectDescription):
|
|
|
|
|
@staticmethod
|
|
|
|
|
def make_labeled_paragraph(label, content, label_class=nodes.strong, content_class=nodes.inline) -> nodes.paragraph:
|
|
|
|
|
return nodes.paragraph('', '', *[
|
|
|
|
|
# TODO: use inline instead of strong when rendering to text
|
|
|
|
|
label_class('', '{}:'.format(label)),
|
|
|
|
|
nodes.inline(text=' '),
|
|
|
|
|
content_class('', content),
|
|
|
|
@ -121,6 +123,7 @@ class DFHackToolDirective(DFHackToolDirectiveBase):
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
def render_content(self) -> List[nodes.Node]:
|
|
|
|
|
# TODO: use inline instead of strong when rendering to text
|
|
|
|
|
tag_nodes = [nodes.strong(text='Tags:'), nodes.inline(text=' ')]
|
|
|
|
|
for tag in self.options.get('tags', []):
|
|
|
|
|
tag_nodes += [
|
|
|
|
|