aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2021-04-26 18:47:01 +0200
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2021-04-26 19:27:19 +0200
commit8a59e623c1137b965dd711af9baf6c943a8eb8ef (patch)
tree7262fb2df26f8f6a0285a6b7794a4dd0b9284a3c
parent1229554f8212c093744660b923e398fd504d7633 (diff)
downloadvendor_replicant-release-scripts-8a59e623c1137b965dd711af9baf6c943a8eb8ef.tar.gz
vendor_replicant-release-scripts-8a59e623c1137b965dd711af9baf6c943a8eb8ef.tar.bz2
vendor_replicant-release-scripts-8a59e623c1137b965dd711af9baf6c943a8eb8ef.zip
release_notes: Fix the text alignment
The text is unnecessarily shifted toward the right by two spaces. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-rwxr-xr-xrelease_notes.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/release_notes.py b/release_notes.py
index 768dbd1..a23efc9 100755
--- a/release_notes.py
+++ b/release_notes.py
@@ -79,6 +79,14 @@ def fix_wordpress_references_link(string):
return string
+def fix_alignment(string):
+ new_string = ""
+ for line in string.split(os.linesep):
+ new_line = re.sub('^ ', '', line)
+ new_string += (new_line + os.linesep)
+
+ return new_string
+
def convert(html_file_path):
with open(html_file_path) as html_file:
try:
@@ -109,6 +117,7 @@ def convert(html_file_path):
text = parser.handle(article.decode())
text = fix_wordpress_references_link(text)
+ text = fix_alignment(text)
return text