@@ -79,6 +79,7 @@ def texi_format(doc):
inlist = ''
lastempty = False
for line in doc.split('\n'):
+ line = line.strip()
empty = line == ''
# FIXME: Doing this in a single if / elif chain is
@@ -427,10 +427,10 @@ class QAPIDoc:
self._append_line = self._append_various_line
self._append_various_line(line)
else:
- self._append_freeform(line.strip())
+ self._append_freeform(line)
else:
# This is a free-form documentation block
- self._append_freeform(line.strip())
+ self._append_freeform(line)
def _append_args_line(self, line):
"""
@@ -463,7 +463,7 @@ class QAPIDoc:
self._append_various_line(line)
return
- self._append_freeform(line.strip())
+ self._append_freeform(line)
def _append_features_line(self, line):
name = line.split(' ', 1)[0]
@@ -482,7 +482,7 @@ class QAPIDoc:
self._append_various_line(line)
return
- self._append_freeform(line.strip())
+ self._append_freeform(line)
def _append_various_line(self, line):
"""
@@ -505,10 +505,6 @@ class QAPIDoc:
line = line[len(name)+1:]
self._start_section(name[:-1])
- if (not self._section.name or
- not self._section.name.startswith('Example')):
- line = line.strip()
-
self._append_freeform(line)
def _start_symbol_section(self, symbols_dict, name):
@@ -78,20 +78,20 @@ doc freeform
* List item one
* Two, multiple
-lines
+ lines
* Three
-Still in list
+ Still in list
Not in list
- Second list
-Note: still in list
+ Note: still in list
Note: not in list
1. Third list
-is numbered
+ is numbered
2. another item
@@ -159,7 +159,7 @@ doc symbol=Alternate
arg=i
an integer
-@b is undocumented
+ @b is undocumented
arg=b
feature=alt-feat
@@ -174,7 +174,7 @@ doc symbol=cmd
the first argument
arg=arg2
the second
-argument
+ argument
arg=arg3
feature=cmd-feat1