mchoe / SwiftSVG

A simple, performant, and lightweight SVG parser
Other
1.92k stars 230 forks source link

Problems with Command ("M") #173

Open IngMarFlo opened 3 years ago

IngMarFlo commented 3 years ago

Description of the Issue I have a svg code with the M command as the first attribute but the library does not working

Sample SVG `

`

Screenshots image

heestand-xyz commented 3 years ago

Hi, this error is thrown here: https://github.com/hexagons/SwiftSVG/blob/2fb9da7c69dd8e357a7f64e48f89a1d028d6c900/SwiftSVG/SVG/Elements/SVGPath.swift#L84

What it's referring to is that the argument must begin with the letter "M" (lowercase or uppercase). I ran into the same issue. My mistake was that I passed the full xml declaration of the SVG format into the parser.