Skip to content

Commit

Permalink
skip "style" data
Browse files Browse the repository at this point in the history
  • Loading branch information
srepmub committed Jul 31, 2020
1 parent aa7a81a commit 19752aa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion html2docx/html2docx.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,9 @@ def handle_starttag(self, tag: str, attrs: List[Tuple[str, Optional[str]]]) -> N
self.table_data.append([])

def handle_data(self, data: str) -> None:
if self.tag in ("td", "th"):
if self.tag == "style":
return
elif self.tag in ("td", "th"):
if self.table_data:
self.table_data[-1].append(data)
return
Expand Down

0 comments on commit 19752aa

Please sign in to comment.