aboutsummaryrefslogtreecommitdiff
path: root/imagemap.py
diff options
context:
space:
mode:
Diffstat (limited to 'imagemap.py')
-rw-r--r--imagemap.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/imagemap.py b/imagemap.py
index 42c1d4a..a3f6490 100644
--- a/imagemap.py
+++ b/imagemap.py
@@ -157,10 +157,12 @@ class ImageMap(inkex.OutputExtension):
if len(shapes[i])==0: inkex.errormsg(_("The hyperlink \"{}\" could not be added to the output.").format(links[i]['href']))
for j in shapes[i]:
attrs=links[i].copy()
- attrs['alt']=alt
attrs.update(j)
+ if attrs['href'] is not None:
+ attrs['alt']=alt
+ alt=None
+ else: attrs['alt']=None
stream.write(bytes(shapemarkup(attrs),'utf-8'))
- alt=None
if __name__ == "__main__":
ImageMap().run()