aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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