-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
If I take the example of use from MDN Network and try to parse it using giosvg, I get an error:
package main
import (
"fmt"
"strings"
"github.com/inkeliz/giosvg"
)
func main() {
_, err := giosvg.NewVectorReader(strings.NewReader(svg))
fmt.Println(err)
}
var svg = `<svg viewBox="0 0 30 10" xmlns="http://www.w3.org/2000/svg">
<circle id="myCircle" cx="5" cy="5" r="4" stroke="blue" />
<use href="#myCircle" x="10" fill="blue" />
<use href="#myCircle" x="20" fill="white" stroke="red" />
</svg>`This prints href ID in use statement was not found in saved defs.
From what I understand, the issue is that giosvg assumes that only those elements appearing in a <def> element can be referenced by use, which the example disagrees with. I ran into this with a real SVG.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels