mirror of
https://github.com/enzet/map-machine.git
synced 2025-08-06 10:09:52 +02:00
Fix SVG checking.
This commit is contained in:
parent
1bb26ad95e
commit
347479428a
1 changed files with 7 additions and 2 deletions
|
@ -139,7 +139,8 @@ def verify_sketch_element(element: Element, id_: str) -> bool:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
style: dict[str, str] = dict(
|
style: dict[str, str] = dict(
|
||||||
[x.split(":") for x in element.attrib["style"].split(";")]
|
(x.split(":")[0], x.split(":")[1])
|
||||||
|
for x in element.attrib["style"].split(";")
|
||||||
)
|
)
|
||||||
if (
|
if (
|
||||||
style["fill"] == "none"
|
style["fill"] == "none"
|
||||||
|
@ -157,7 +158,11 @@ def verify_sketch_element(element: Element, id_: str) -> bool:
|
||||||
):
|
):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
if style["fill"] == "#0000ff" and style["stroke"] == "none":
|
if (
|
||||||
|
style["fill"] == "#0000ff"
|
||||||
|
and "stroke" in style
|
||||||
|
and style["stroke"] == "none"
|
||||||
|
):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
if style and not id_.startswith("use"):
|
if style and not id_.startswith("use"):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue