From 602f201cb6236a7cb4a041b84e761aaedc358ab0 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Wed, 6 Mar 2019 20:32:51 -0500 Subject: implement trim option for lettering --- lib/commands.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/commands.py') diff --git a/lib/commands.py b/lib/commands.py index ddee8326..53b9e77f 100644 --- a/lib/commands.py +++ b/lib/commands.py @@ -254,7 +254,12 @@ def symbol_defs(): @cache def get_defs(document): - return document.find(SVG_DEFS_TAG) + defs = document.find(SVG_DEFS_TAG) + + if defs is None: + defs = inkex.etree.SubElement(document, SVG_DEFS_TAG) + + return defs def ensure_symbol(document, command): -- cgit v1.2.3