diff --git a/html2docx/html2docx.py b/html2docx/html2docx.py index 0098b62..516c298 100644 --- a/html2docx/html2docx.py +++ b/html2docx/html2docx.py @@ -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