Remove paragraph deduplication. Apparently it's not necessary after all..?
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
5789f9b188
commit
3d2bb6f5be
|
@ -70,7 +70,6 @@ def right_align_header(document):
|
||||||
def double_space_and_indent(paragraphs):
|
def double_space_and_indent(paragraphs):
|
||||||
this_paragraph_plaintext = False
|
this_paragraph_plaintext = False
|
||||||
previous_paragraph_plaintext = False
|
previous_paragraph_plaintext = False
|
||||||
previous_paragraph_style = None
|
|
||||||
|
|
||||||
for paragraph in paragraphs:
|
for paragraph in paragraphs:
|
||||||
paragraph.paragraph_format.line_spacing = 2
|
paragraph.paragraph_format.line_spacing = 2
|
||||||
|
@ -89,12 +88,7 @@ def double_space_and_indent(paragraphs):
|
||||||
if this_paragraph_plaintext and previous_paragraph_plaintext:
|
if this_paragraph_plaintext and previous_paragraph_plaintext:
|
||||||
paragraph.paragraph_format.first_line_indent = docx.shared.Inches(0.5)
|
paragraph.paragraph_format.first_line_indent = docx.shared.Inches(0.5)
|
||||||
|
|
||||||
# Remove duplicate empty paragraphs to cut down on vertical whitespace.
|
|
||||||
if paragraph.style == previous_paragraph_style and not paragraph.text:
|
|
||||||
paragraph._element.getparent().remove(paragraph._element)
|
|
||||||
|
|
||||||
previous_paragraph_plaintext = this_paragraph_plaintext
|
previous_paragraph_plaintext = this_paragraph_plaintext
|
||||||
previous_paragraph_style = paragraph.style
|
|
||||||
|
|
||||||
|
|
||||||
def parse_arguments(unparsed_arguments):
|
def parse_arguments(unparsed_arguments):
|
||||||
|
|
Loading…
Reference in New Issue