uber / cyborg

Display Android Vectordrawables on iOS.
Apache License 2.0
300 stars 19 forks source link

Fix incorrect logic for ending elements #55

Closed benpious closed 5 years ago

benpious commented 5 years ago

We used to use the last element to end normal closing elements. But in retrospect that approach was obviously flawed, because a sequence of group-open, path-open, path-close, group-close would have caused it to pass the wrong element to the parser objects (path instead of group).

The original logic for this was pretty messed up, and one of the consequences was that saving the last element instead of using a "fresh" element from the xml parser actually fixed it for some of the drawables I was using at the time.

This pull request corrects this issue.

CLAassistant commented 5 years ago

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.