From c75b90154b5bf6e40bb6286dc1e42949311fe240 Mon Sep 17 00:00:00 2001 From: Kaalleen <36401965+kaalleen@users.noreply.github.com> Date: Sat, 9 Oct 2021 10:03:41 +0200 Subject: Do not render comments (#1363) --- lib/extensions/base.py | 5 +++++ requirements.txt | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/extensions/base.py b/lib/extensions/base.py index 828e3685..cc2fea53 100644 --- a/lib/extensions/base.py +++ b/lib/extensions/base.py @@ -10,6 +10,7 @@ from collections.abc import MutableMapping import inkex from lxml import etree +from lxml.etree import Comment from stringcase import snakecase from ..commands import is_command, layer_commands @@ -129,6 +130,10 @@ class InkstitchExtension(inkex.Effect): def descendants(self, node, selected=False, troubleshoot=False): # noqa: C901 nodes = [] + + if node.tag == Comment: + return [] + element = EmbroideryElement(node) if element.has_command('ignore_object'): diff --git a/requirements.txt b/requirements.txt index 698ea35d..1e226f2b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ # This installs inkex, the Inkscape python extension library. # We need the new style handling that was added after the inkex version bundled # with Inkscape 1.1. That's why we're installing from Git. --e git+https://gitlab.com/inkscape/extensions.git@139d71470e7d6bbe9fcd869f385fc73e3a8a8bea#egg=inkscape-core-extensions +-e git+https://gitlab.com/inkscape/extensions.git@3796f912f666a0981917839c77eb94fdd6fc6a94#egg=inkscape-core-extensions backports.functools_lru_cache wxPython -- cgit v1.2.3