summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/qapi/doc.py1
-rw-r--r--scripts/qapi/parser.py12
2 files changed, 5 insertions, 8 deletions
diff --git a/scripts/qapi/doc.py b/scripts/qapi/doc.py
index 92f584edcf..7764de1e4b 100644
--- a/scripts/qapi/doc.py
+++ b/scripts/qapi/doc.py
@@ -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
diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py
index 165925ca72..04bf10db37 100644
--- a/scripts/qapi/parser.py
+++ b/scripts/qapi/parser.py
@@ -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):