Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table padding crash on empty tables #320

Closed
cgianlu opened this issue Apr 23, 2020 · 4 comments
Closed

Table padding crash on empty tables #320

cgianlu opened this issue Apr 23, 2020 · 4 comments

Comments

@cgianlu
Copy link

cgianlu commented Apr 23, 2020

reformat_table function raise an exception in case of empty tables (i.e. <table></table>).

In fact in this case the list passed as parameter (lines) is empty so the following statement is wrong (lines[0] does not exist!)

              max_width = [len(x.rstrip()) + right_margin for x in lines[0].split("|")]
@mpodolsk
Copy link
Contributor

mpodolsk commented Jun 1, 2021

any plans to patch this issue, looks simple enough?

@mpodolsk
Copy link
Contributor

mpodolsk commented Jun 8, 2021

the issue is also present when the does not have corresponding .
closing the is optional.
this issue is present because whole table is treated as one line and the </special_marker_for_table_padding> is in that line

I will workup a fork.

Alir3z4 added a commit that referenced this issue Jun 12, 2021
FIX issue #320 crashes when padding empty table
@Alir3z4
Copy link
Owner

Alir3z4 commented Jun 12, 2021

Fixed in #361

@Alir3z4 Alir3z4 closed this as completed Jun 12, 2021
@mpodolsk
Copy link
Contributor

when this will be tagged and published as a release ?
looking at repo tags there are some tags missing comparing to change-log notes.
latest points to 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants