summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-04-28 14:10:08 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-04-29 16:45:46 +0200
commitf1a20670f5c595bf3128816a6152729f44dfea90 (patch)
tree855a53251adde9bd33113589565807d0b57670f0
parentspec: Fix CONFIGURE_BSP_PREREQUISITE_DRIVERS docs (diff)
downloadrtems-central-f1a20670f5c595bf3128816a6152729f44dfea90.tar.bz2
content: Apply initial indent only to first block
-rw-r--r--rtemsspec/content.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/rtemsspec/content.py b/rtemsspec/content.py
index f6c3fdf1..bffcacff 100644
--- a/rtemsspec/content.py
+++ b/rtemsspec/content.py
@@ -260,7 +260,6 @@ class Content:
wrapper = textwrap.TextWrapper()
wrapper.break_long_words = False
wrapper.break_on_hyphens = False
- wrapper.initial_indent = initial_indent
wrapper.width = 79 - len(self._indent)
gap = [] # type: List[str]
blocks = collections.deque(text.split("\n\n"))
@@ -279,6 +278,10 @@ class Content:
continue
else:
wrapper.subsequent_indent = subsequent_indent
+ if gap:
+ wrapper.initial_indent = subsequent_indent
+ else:
+ wrapper.initial_indent = initial_indent
self._lines.extend(gap)
self._lines.extend(
_indent(wrapper.wrap(block), self._indent,