From 475cfcc44e7f7957da4044a4f0286b9b8e7795f8 Mon Sep 17 00:00:00 2001 From: Dmitry Gritsenko Date: Sat, 4 May 2024 23:04:09 +0400 Subject: [PATCH] fix: now xml_parse actually doesn't break on comments (i hate lxml) --- pyproject.toml | 2 +- soda/xml_parse.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 6f226ab..9d739ec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [tool.poetry] name = "soda-svg" packages = [{include = "soda"}] -version = "2.0.0" +version = "2.0.1" description = "Fast SVG generation tool" authors = ["Dmitry Gritsenko "] license = "MIT" diff --git a/soda/xml_parse.py b/soda/xml_parse.py index 6141966..549699e 100644 --- a/soda/xml_parse.py +++ b/soda/xml_parse.py @@ -44,7 +44,7 @@ def process_children(element: etree._Element) -> Iterable[Tag]: def element_to_tag(element: etree._Element) -> Tag: - if isinstance(element.tag, etree._Comment): + if not isinstance(element.tag, str): return XMLComment(element.tag.text) tag_name = element.tag.split("}")[-1]