summaryrefslogtreecommitdiff
path: root/lib/commands.py
diff options
context:
space:
mode:
authorLex Neva <github.com@lexneva.name>2019-03-06 20:32:51 -0500
committerLex Neva <github.com@lexneva.name>2019-03-08 19:57:11 -0500
commit602f201cb6236a7cb4a041b84e761aaedc358ab0 (patch)
tree0a2148fc4f49bd271a12cbbd4fe057c5a19fd9bd /lib/commands.py
parent53a9bd6b31ca3a1f50d41f228e0b598a7d9da8ea (diff)
implement trim option for lettering
Diffstat (limited to 'lib/commands.py')
-rw-r--r--lib/commands.py7
1 files changed, 6 insertions, 1 deletions
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):