Commit a7132829 authored by Derek Schaab's avatar Derek Schaab

Use full closing tag on use tags instead of self-closing

https://stackoverflow.com/questions/12686247/safari-6-svg-tag-use-issues
parent 1b25a9ea
...@@ -106,6 +106,7 @@ var ( ...@@ -106,6 +106,7 @@ var (
tagText = []byte(`<text`) tagText = []byte(`<text`)
tagTextClose = []byte(`</text>`) tagTextClose = []byte(`</text>`)
tagUse = []byte(`<use`) tagUse = []byte(`<use`)
tagUseClose = []byte(`</use>`)
attFill = []byte(` fill="`) attFill = []byte(` fill="`)
attFontFamily = []byte(` font-family="`) attFontFamily = []byte(` font-family="`)
attFontSize = []byte(` font-size="`) attFontSize = []byte(` font-size="`)
...@@ -238,8 +239,8 @@ func (w *svgWriter) writeSquareBackground(x, y, href []byte) { ...@@ -238,8 +239,8 @@ func (w *svgWriter) writeSquareBackground(x, y, href []byte) {
w.write(attY) w.write(attY)
w.write(y) w.write(y)
w.write(quote) w.write(quote)
w.write(slash)
w.write(bracket) w.write(bracket)
w.write(tagUseClose)
} }
func (w *svgWriter) writeSquareLabel(lbl []byte, x, y, fill []byte) { func (w *svgWriter) writeSquareLabel(lbl []byte, x, y, fill []byte) {
...@@ -270,6 +271,6 @@ func (w *svgWriter) writePiece(p chess.Piece, x, y []byte) { ...@@ -270,6 +271,6 @@ func (w *svgWriter) writePiece(p chess.Piece, x, y []byte) {
w.write(attY) w.write(attY)
w.write(y) w.write(y)
w.write(quote) w.write(quote)
w.write(slash)
w.write(bracket) w.write(bracket)
w.write(tagUseClose)
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment