[rtems-central commit] content: Apply initial indent only to first block
Sebastian Huber
sebh at rtems.org
Fri Apr 30 05:02:48 UTC 2021
Module: rtems-central
Branch: master
Commit: f1a20670f5c595bf3128816a6152729f44dfea90
Changeset: http://git.rtems.org/rtems-central/commit/?id=f1a20670f5c595bf3128816a6152729f44dfea90
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Wed Apr 28 14:10:08 2021 +0200
content: Apply initial indent only to first block
---
rtemsspec/content.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/rtemsspec/content.py b/rtemsspec/content.py
index f6c3fdf..bffcacf 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,
More information about the vc
mailing list