Skip to content

Commit

Permalink
Fix chart format bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jbaublitz committed Nov 30, 2024
1 parent bd2263f commit 910f0bf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions language_practice/web/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ def uk_ru_tables(tables: list[Any], remove: str) -> list[list[list[str]]]:
for tr in table.find_all("tr")
if [entry.text.strip() for entry in tr.find_all("td")] != []
]
max_len = max(map(len, chart))
for chart_line in chart:
for _ in range(0, max_len - len(chart_line)):
chart_line.insert(1, "")

charts.append(chart)

Expand Down

0 comments on commit 910f0bf

Please sign in to comment.