Skip to content

Commit

Permalink
fix formatting of captions and colgroups
Browse files Browse the repository at this point in the history
  • Loading branch information
ikirudennis committed Aug 6, 2024
1 parent 57e01fc commit 063aaab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions textile/objects/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def __init__(self, capts, cap, row, restricted):

def process(self, cap):
tag = generate_tag('caption', cap.strip(), self.attributes)
return '\t{0}\n\t'.format(tag)
return '\t{0}\n'.format(tag)


class Colgroup(object):
Expand Down Expand Up @@ -181,7 +181,7 @@ def process(self):
# tab between cols and a newline at the end
xml_declaration = "<?xml version='1.0' encoding='UTF-8'?>\n"
colgrp = colgrp.replace(xml_declaration, '')
return colgrp.replace('><', '>\n\t<')
return f'\t{colgrp.replace('><', '>\n\t<')}'


class Row(object):
Expand Down

0 comments on commit 063aaab

Please sign in to comment.