fix issue with plural names in include_dict
parent
35f3acc9fd
commit
e30481de90
|
@ -171,14 +171,15 @@ def svg2paths(
|
||||||
# from IPython import embed; embed() ### DEBUG
|
# from IPython import embed; embed() ### DEBUG
|
||||||
return d
|
return d
|
||||||
|
|
||||||
included_elements = {
|
include_dict = {
|
||||||
'circles': convert_circles_to_paths,
|
'circle': convert_circles_to_paths,
|
||||||
'ellipses': convert_ellipses_to_paths,
|
'ellipse': convert_ellipses_to_paths,
|
||||||
'lines': convert_lines_to_paths,
|
'line': convert_lines_to_paths,
|
||||||
'polyline': convert_polylines_to_paths,
|
'polyline': convert_polylines_to_paths,
|
||||||
'polygon': convert_polygons_to_paths,
|
'polygon': convert_polygons_to_paths,
|
||||||
'rect': convert_rectangles_to_paths,
|
'rect': convert_rectangles_to_paths,
|
||||||
}
|
}
|
||||||
|
included_elements = set(name for name, is_included in include_dict.items() if is_included)
|
||||||
|
|
||||||
attribute_dictionaries = [
|
attribute_dictionaries = [
|
||||||
(node.localName, dom2dict(node)) for node in doc.documentElement.childNodes
|
(node.localName, dom2dict(node)) for node in doc.documentElement.childNodes
|
||||||
|
|
Loading…
Reference in New Issue