def subst_strong(doc):
"""Replaces *foo* by @strong{foo}"""
- return re.sub(r'\*([^*\n]+)\*', r'@emph{\1}', doc)
+ return re.sub(r'\*([^*\n]+)\*', r'@strong{\1}', doc)
def subst_emph(doc):
"""Replaces _foo_ by @emph{foo}"""
- return re.sub(r'\b_([^_\n]+)_\b', r' @emph{\1} ', doc)
+ return re.sub(r'\b_([^_\n]+)_\b', r'@emph{\1}', doc)
def subst_vars(doc):
# doesn't.
#
# Make sure to update section "Documentation markup" in
- # docs/qapi-code-gen.txt when fixing this.
+ # docs/devel/qapi-code-gen.txt when fixing this.
if line.startswith('| '):
line = EXAMPLE_FMT(code=line[2:])
elif line.startswith('= '):
def visit_object_type(self, name, info, base, members, variants):
doc = self.cur_doc
- if not variants:
- typ = 'Struct'
- elif variants._tag_name: # TODO unclean member access
- typ = 'Flat Union'
- else:
- typ = 'Simple Union'
if base and base.is_implicit():
base = None
if self.out:
self.out += '\n'
- self.out += TYPE_FMT(type=typ,
+ self.out += TYPE_FMT(type='Object',
name=doc.symbol,
body=texi_entity(doc, 'Members', base, variants))
if not qapi.doc_required:
print >>sys.stderr, ("%s: need pragma 'doc-required' "
"to generate documentation" % argv[0])
+ sys.exit(1)
print texi_schema(schema)