doc: escape output types (esp short_channel_id).

We can also remove the listpeers closer hack, which was removed from
the schema already.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2022-09-08 10:38:00 +09:30
committed by Christian Decker
parent bef2a47ab7
commit fb433a70f8
89 changed files with 106 additions and 110 deletions

View File

@@ -30,13 +30,9 @@ def output(line):
def output_type(properties, is_optional):
# FIXME: there's a horrible hack for listpeers' closer which can be NULL
if type(properties['type']) is list:
typename = properties['type'][0]
else:
typename = properties['type']
typename = properties['type'].replace('_', '\\_')
if typename == 'array':
typename += ' of {}s'.format(properties['items']['type'])
typename += ' of {}s'.format(properties['items']['type'].replace('_', '\\_'))
if is_optional:
typename += ", optional"
output(" ({})".format(typename))