Skip to content

Commit

Permalink
Check colspan string is number before converting to number
Browse files Browse the repository at this point in the history
  • Loading branch information
xxyzz committed Nov 9, 2023
1 parent 24d6a68 commit a91e5a0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/wiktextract/extractor/fr/inflection.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,4 +172,6 @@ def process_inflection_table(
new_form_data["form"] = form
page_data[-1]["forms"].append(new_form_data)

column_cell_index += int(table_cell.attrs.get("colspan", 1))
colspan_text = table_cell.attrs.get("colspan", "1")
if colspan_text.isdigit():
column_cell_index += int(colspan_text)

0 comments on commit a91e5a0

Please sign in to comment.