mirror of
https://github.com/ManimCommunity/manim.git
synced 2026-06-22 10:01:47 +00:00
Handle extra whitespace in svg element's style value (#1170)
This commit is contained in:
parent
71a05e82b9
commit
b460712878
2 changed files with 3 additions and 3 deletions
|
|
@ -72,13 +72,13 @@ def cascade_element_style(
|
|||
try:
|
||||
key, value = style_spec.split(":")
|
||||
except ValueError as e:
|
||||
if not style_spec:
|
||||
if not style_spec.strip():
|
||||
# there was just a stray semicolon at the end, producing an emptystring
|
||||
pass
|
||||
else:
|
||||
raise e
|
||||
else:
|
||||
style[key] = value
|
||||
style[key.strip()] = value.strip()
|
||||
|
||||
return style
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100">
|
||||
<g>
|
||||
<path style="fill:white" d="m 50,50 10,10 -10,10 z m 30,0 -10,-10, -10,10 z">
|
||||
<path style="fill : white" d="m 50,50 10,10 -10,10 z m 30,0 -10,-10, -10,10 z">
|
||||
</path>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 175 B After Width: | Height: | Size: 177 B |
Loading…
Add table
Add a link
Reference in a new issue